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:
parent
c6b3926f1e
commit
b28b64f5f6
|
@ -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
|
||||
|
|
|
@ -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/*
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue