From bc00a2e20410b088039217e0c61d30c796e1337d Mon Sep 17 00:00:00 2001 From: Dmitry Ilvokhin Date: Fri, 2 Jan 2026 16:36:39 +0000 Subject: Add script to deploy built packages --- bin/deploy | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 bin/deploy 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` -- cgit v1.2.3-70-g09d2