From 085c88296760818170d361542c15d7bcf8c9e3cf Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 10 Sep 2018 15:58:31 -0500 Subject: adelie-build-txz: add --mini option for minirootfs --- adelie-build-txz | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'adelie-build-txz') diff --git a/adelie-build-txz b/adelie-build-txz index 1ae12fa..f249480 100755 --- a/adelie-build-txz +++ b/adelie-build-txz @@ -47,7 +47,7 @@ ensure_commands() { usage() { - printf 'usage: %s [-a ARCH] [-s] [-v VERSION] [--help]\n\n' $PROGNAME + printf 'usage: %s [-a ARCH] [--mini] [-s] [-v VERSION] [--help]\n\n' $PROGNAME printf 'Create an Adélie Linux root FS tarball (.TXZ) using the specified parameters.\n\n' printf 'Default ARCH: %s\n' $def_arch printf 'Default VERSION: %s\n' $def_ver @@ -64,6 +64,9 @@ while [ -n "$1" ]; do usage exit ;; + --mini) + declare -r MINI=yes + ;; -s | --sign) declare -r SIGN=yes ;; @@ -110,8 +113,13 @@ clean_dirs() { install_pkgs() { header "Installing base system to tar root..." - declare -r PACKAGES=$(cat packages 2>/dev/null || fatal 'No core packages specified') - declare -r ARCH_PKGS=$(cat packages-$ARCH 2>/dev/null || echo '') + if test -n "${MINI+mini}"; then + declare -r PACKAGES="adelie-base-posix bash-binsh ssmtp" + declare -r ARCH_PKGS="" + else + declare -r PACKAGES=$(cat packages 2>/dev/null || fatal 'No core packages specified') + declare -r ARCH_PKGS=$(cat packages-$ARCH 2>/dev/null || echo '') + fi mkdir -p rootfs-$ARCH/etc/apk/keys cp 'packages@adelielinux.org.pub' rootfs-$ARCH/etc/apk/keys/ @@ -179,7 +187,7 @@ tar_it() { header 'Creating compressed file system image...' cd rootfs-$ARCH - tar -cJf ../out/adelie-rootfs-$ARCH-$VERSION-$(date +%Y%m%d).txz . + tar -cJf ../out/adelie-rootfs-${MINI+mini-}$ARCH-$VERSION-$(date +%Y%m%d).txz . } # in case we want to add phase support like adelie-build-cd has later -- cgit v1.2.3-70-g09d2