Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/upload-to-bootstrap
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-10-15 08:48:51 +0200
committerErich Eckner <git@eckner.net>2018-10-15 08:48:51 +0200
commit7dda901464f690fc9b3876030a32a551c3d1a0cd (patch)
tree9dd8bf79a86a5233a2f509bd65be0926635e2f91 /upload-to-bootstrap
parenta593f78fa87d18d72a8a3c51157f00c9cedf4d7b (diff)
upload-to-bootstrap new for uploading i486 packages into abaumann's bootstrap repository
Diffstat (limited to 'upload-to-bootstrap')
-rwxr-xr-xupload-to-bootstrap33
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