summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-01 14:40:25 +0200
committerErich Eckner <git@eckner.net>2017-06-01 14:40:25 +0200
commit29dd1d07cf415a63aa510a6eb4d27bf64a1f598e (patch)
treee2cbdcee055b0dcca553576e81066ff865ed9302
downloadbuild-arch-iso-29dd1d07cf415a63aa510a6eb4d27bf64a1f598e.tar.xz
Initial commit
-rwxr-xr-xbuild-arch-iso31
-rwxr-xr-xbuild-iso37
2 files changed, 68 insertions, 0 deletions
diff --git a/build-arch-iso b/build-arch-iso
new file mode 100755
index 0000000..3b94164
--- /dev/null
+++ b/build-arch-iso
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -e
+
+if [ "$(whoami)" != "root" ]; then
+ sudo "$0" "$@"
+ exit $?
+fi
+
+tmp_dir="$(mktemp -d)"
+destination="${tmp_dir}"
+
+echo 'build i686-iso ...'
+
+"${0%/*}/build-iso" 32
+
+echo '... done.'
+
+cp /usr/share/archiso/configs/releng/out/archlinux-*.iso "${destination}/"
+
+echo 'build dual-iso ...'
+
+"${0%/*}/build-iso" dual
+
+echo '... done.'
+
+cp /usr/share/archiso/configs/releng/out/archlinux-*.iso "${destination}/"
+
+chown erich:users "${destination}"/archlinux-*.iso
+
+su erich -c 'rsync -av "${destination}/"archlinux-*.iso paule@jeti100:/srv/arch-mirror/arch/arch/archlinux32/archisos/'
diff --git a/build-iso b/build-iso
new file mode 100755
index 0000000..97de450
--- /dev/null
+++ b/build-iso
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+if [ "$1" == "32" ]; then
+ iso_tools="archiso32"
+elif [ "$1" == "dual" ]; then
+ iso_tools="archiso-dual"
+else
+ (
+ echo 'usage:'
+ echo " $0 32"
+ echo " $0 dual"
+ ) | tee -a /tmp/error-log
+ exit 1
+fi
+
+set -e
+
+[ -b /dev/loop0 ] || \
+ mknod /dev/loop0 b 7 0
+
+pacman -Rs --noconfirm archiso32 || true
+pacman -Rs --noconfirm archiso-dual || true
+pacman -Syu --noconfirm "${iso_tools}"
+
+cd /usr/share/archiso/configs/releng
+
+rm --one-file-system -rf out work
+
+mkdir out work
+
+echo 'building iso ...'
+
+./build.sh &> /root/${iso_tools}-log
+
+echo '... done.'
+
+pacman -Rs --noconfirm "${iso_tools}"