mklive.sh: move installer.sh to build-x86-images.sh

Running mklive.sh without any arguments produces a minimal image that
doesn't have dialog installed which is required for installer.sh. Let's
move installing the installer script up a level to
build-x86-64-images.sh which already adds a dialog dependency.
This commit is contained in:
Michal Vasilek 2022-12-17 13:04:00 +01:00 committed by classabbyamp
parent c6b3926f1e
commit b28b64f5f6
2 changed files with 15 additions and 2 deletions

View File

@ -22,6 +22,13 @@ esac
done
shift $((OPTIND - 1))
INCLUDEDIR=$(mktemp -d)
trap "cleanup" INT TERM
cleanup() {
rm -r "$INCLUDEDIR"
}
build_variant() {
variant="$1"
shift
@ -74,7 +81,7 @@ build_variant() {
;;
esac
./mklive.sh -a "$ARCH" -o "$IMG" -p "$PKGS" -S "$SERVICES" ${REPO} "$@"
./mklive.sh -a "$ARCH" -o "$IMG" -p "$PKGS" -S "$SERVICES" -I "$INCLUDEDIR" ${REPO} "$@"
}
if [ ! -x mklive.sh ]; then
@ -82,6 +89,13 @@ if [ ! -x mklive.sh ]; then
exit 1
fi
if [ -x installer.sh ]; then
install -Dm755 installer.sh "$INCLUDEDIR"/usr/bin/void-installer
else
echo installer.sh not found >&2
exit 1
fi
for image in $IMAGES; do
build_variant "$image" "$@"
done

View File

@ -133,7 +133,6 @@ install_packages() {
fi
chroot "$ROOTFS" env -i xbps-reconfigure -a
install -Dm755 installer.sh "$ROOTFS"/usr/sbin/void-installer
# Cleanup and remove useless stuff.
rm -rf "$ROOTFS"/var/cache/* "$ROOTFS"/run/* "$ROOTFS"/var/run/*
}