diff options
-rwxr-xr-x | adelie-build-txz | 16 | ||||
-rw-r--r-- | adelie-build-txz.8 | 4 |
2 files changed, 16 insertions, 4 deletions
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 diff --git a/adelie-build-txz.8 b/adelie-build-txz.8 index 4e4e22e..4dcc4ca 100644 --- a/adelie-build-txz.8 +++ b/adelie-build-txz.8 @@ -7,6 +7,7 @@ .Sh SYNOPSIS .Nm .Op Fl a Ar ARCH +.Op Fl -mini .Op Fl v Ar VERSION .Sh DESCRIPTION .Nm @@ -23,6 +24,9 @@ however, some architectures may require you to have additional utilities present on your system to be made bootable. This defaults to the currently running system's architecture as reported by .Xr uname 1 . +.It Fl -mini +Specifies that a mini rootfs (no kernel or live media tools installed) is +desired. .It Fl v Ar VERSION Specifies the version of Adélie Linux to use for the created rootfs tarball. .El |