diff options
-rwxr-xr-x | upload-to-bootstrap | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/upload-to-bootstrap b/upload-to-bootstrap new file mode 100755 index 0000000..a3a6b34 --- /dev/null +++ b/upload-to-bootstrap @@ -0,0 +1,33 @@ +#!/bin/sh + +set -e -u + +if [ $# -gt 3 ] || ! pkgbase="$1"; then + >&2 echo 'usage:' + >&2 echo ' upload-to-bootstrap $pkgbase [$slave [$slave_host]]' +fi +slave_host="${3-nlopc46}" +slave="${2-arch32-bs0}" + +tmp_file=$(mktemp 'pkgs.XXXXXXXX.tar' --tmpdir) +trap 'rm -f "${tmp_file}"' EXIT + +ssh "${slave_host}" ' + ssh "'"${slave}"'" " + cd '"$1"'; + tar -c *.pkg.tar.xz{,.sig} + " +' > \ + "${tmp_file}" + +for i in 1 2; do + ssh bs32mirror$i ' + cd bootstrap/i486/; + pkgs=$( + tar -xv | \ + grep "\.xz\$" + ); + repo-add bootstrap.db.tar.gz ${pkgs} + ' < \ + "${tmp_file}" +done |