Unverified Commit 085c8829 authored by A. Wilcox's avatar A. Wilcox 🦊
Browse files

adelie-build-txz: add --mini option for minirootfs

parent d7fb725f
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment