diff options
Diffstat (limited to 'adelie-build-cd')
-rwxr-xr-x | adelie-build-cd | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/adelie-build-cd b/adelie-build-cd index 29c1e14..6c3840f 100755 --- a/adelie-build-cd +++ b/adelie-build-cd @@ -1,5 +1,6 @@ #!/bin/sh -e +set -e def_arch=$(uname -m) def_ver="1.0-rc1" readonly PROGNAME=$(basename $0) @@ -32,7 +33,7 @@ fatal() { ensure_commands() { - if ! command -pv apk>/dev/null 2>/dev/null; then + if ! command -v apk>/dev/null 2>/dev/null; then fatal printf 'You must have apk installed. On Gentoo, see sys-devel/apk-tools.\n' exit 127 @@ -44,13 +45,13 @@ ensure_commands() { exit 127 fi - if ! command -pv mksquashfs>/dev/null 2>/dev/null; then + if ! command -v mksquashfs>/dev/null 2>/dev/null; then fatal printf 'You must have mksquashfs installed. On Gentoo, see sys-fs/squashfs-tools.\n' exit 127 fi - if ! command -pv xorriso>/dev/null 2>/dev/null; then + if ! command -v xorriso>/dev/null 2>/dev/null; then fatal printf 'You must have xorriso installed:\n\n' printf '* cdrkit (Alpine, Gentoo) will not generate a usable PPC ISO.\n' @@ -144,9 +145,9 @@ clean_dirs() { install_pkgs() { header "Installing base system to squash root..." - readonly PACKAGES=$(cat packages/base 2>/dev/null || fatal 'No core packages specified') - readonly ARCH_PKGS=$(cat packages/arch/$ARCH 2>/dev/null || echo '') - readonly KIND_PKGS=$(cat packages/kind/$KIND 2>/dev/null || echo '') + readonly PACKAGES="$(cat packages/base 2>/dev/null | tr '\n' ' ' || fatal 'No core packages specified')" + readonly ARCH_PKGS="$(cat packages/arch/$ARCH 2>/dev/null | tr '\n' ' ' || echo '')" + readonly KIND_PKGS="$(cat packages/kind/$KIND 2>/dev/null | tr '\n' ' ' || echo '')" mkdir -p squashroot-$ARCH/etc/apk/keys cp 'packages@adelielinux.org.pub' squashroot-$ARCH/etc/apk/keys/ |