#!/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}"