Skip to content

Commit b28b64f

Browse files
paper42classabbyamp
authored andcommitted
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.
1 parent c6b3926 commit b28b64f

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

build-x86-images.sh.in

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ esac
2222
done
2323
shift $((OPTIND - 1))
2424

25+
INCLUDEDIR=$(mktemp -d)
26+
trap "cleanup" INT TERM
27+
28+
cleanup() {
29+
rm -r "$INCLUDEDIR"
30+
}
31+
2532
build_variant() {
2633
variant="$1"
2734
shift
@@ -74,14 +81,21 @@ build_variant() {
7481
;;
7582
esac
7683

77-
./mklive.sh -a "$ARCH" -o "$IMG" -p "$PKGS" -S "$SERVICES" ${REPO} "$@"
84+
./mklive.sh -a "$ARCH" -o "$IMG" -p "$PKGS" -S "$SERVICES" -I "$INCLUDEDIR" ${REPO} "$@"
7885
}
7986

8087
if [ ! -x mklive.sh ]; then
8188
echo mklive.sh not found >&2
8289
exit 1
8390
fi
8491

92+
if [ -x installer.sh ]; then
93+
install -Dm755 installer.sh "$INCLUDEDIR"/usr/bin/void-installer
94+
else
95+
echo installer.sh not found >&2
96+
exit 1
97+
fi
98+
8599
for image in $IMAGES; do
86100
build_variant "$image" "$@"
87101
done

mklive.sh.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ install_packages() {
133133
fi
134134
chroot "$ROOTFS" env -i xbps-reconfigure -a
135135

136-
install -Dm755 installer.sh "$ROOTFS"/usr/sbin/void-installer
137136
# Cleanup and remove useless stuff.
138137
rm -rf "$ROOTFS"/var/cache/* "$ROOTFS"/run/* "$ROOTFS"/var/run/*
139138
}

0 commit comments

Comments
 (0)