diff options
| -rwxr-xr-x | bin/deploy | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/bin/deploy b/bin/deploy new file mode 100755 index 0000000..8ca375e --- /dev/null +++ b/bin/deploy @@ -0,0 +1,26 @@ +#! /usr/bin/env bash + +if [ "$#" -ne 1 ]; then + echo "Usage: $0 PACKAGE" 1>&2 + exit 1 +fi + +package=$1 +arch=x86_64 +host=packages.ilvokhin.com +repo_dir=/srv/http/$host +db=misc.db.tar.zst + +if [[ ! $package =~ $arch ]]; then + echo "Package arch is not $arch." 1>&2 + exit 1 +fi + +rsync \ + --compress \ + --links \ + --progress \ + $package \ + $host:$repo_dir/$arch + +ssh $host -- repo-add $repo_dir/$db $repo_dir/$arch/`basename $package` |