Create a tarball containing entire packages directory

This commit is contained in:
Jacob 2023-09-16 16:28:22 +02:00
parent f63a8c92de
commit 7f1cbbf3e5

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# aurmake
source .OPT || exit 1
@ -18,6 +18,12 @@ else
printf "Warning: repo-add not found, will only copy viewer.\n" >> /dev/stderr
fi
if [ -d "packages/" ]; then
tar -cf packages.tar packages
gzip -c packages.tar > packages/packages.tar.gz
rm -f packages.tar
fi
if [ "$1" = "publish" ]; then
[ ! -x "$(command -v rsync)" ] && printf "rsync not found.\n" > /dev/stderr && exit 1
rsync -avPz packages/ ${SERVER_USER}@${SERVER_IP}:${SERVER_LOCATION}/packages/