Skip to content

Commit 3c12c74

Browse files
agausmannthe-maldridge
authored andcommitted
Add -o <outfile> to mkplatformfs.sh for feature parity
1 parent 4ffa689 commit 3c12c74

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

mkplatformfs.sh.in

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Options
6161
-C <file> Full path to the XBPS configuration file
6262
-r <repo> Set XBPS repository (may be set multiple times)
6363
-x <num> Use <num> threads to compress the image (dynamic if unset)
64+
-o <file> Filename to write the PLATFORMFS archive to
6465
-n Do not compress the image, instead print out the rootfs directory
6566
-h Show this help
6667
-V Show version
@@ -74,7 +75,7 @@ _EOF
7475
BASEPKG=base-system
7576
COMPRESSION="y"
7677

77-
while getopts "b:p:k:c:C:r:x:nhV" opt; do
78+
while getopts "b:p:k:c:C:r:x:o:nhV" opt; do
7879
case $opt in
7980
b) BASEPKG="$OPTARG" ;;
8081
p) EXTRA_PKGS="$OPTARG" ;;
@@ -83,6 +84,7 @@ while getopts "b:p:k:c:C:r:x:nhV" opt; do
8384
C) XBPS_CONFFILE="-C $OPTARG" ;;
8485
r) XBPS_REPOSITORY="$XBPS_REPOSITORY --repository=$OPTARG" ;;
8586
x) COMPRESSOR_THREADS="$OPTARG" ;;
87+
o) FILENAME="$OPTARG" ;;
8688
n) COMPRESSION="n" ;;
8789
h) usage; exit 0 ;;
8890
V) echo "$PROGNAME @@MKLIVE_VERSION@@"; exit 0 ;;
@@ -222,7 +224,7 @@ fi
222224
if [ "$COMPRESSION" = "y" ]; then
223225
# Finally we can compress the tarball, the name will include the
224226
# platform and the date on which the tarball was built.
225-
tarball=void-${PLATFORM}-PLATFORMFS-$(date '+%Y%m%d').tar.xz
227+
tarball=${FILENAME:-void-${PLATFORM}-PLATFORMFS-$(date '+%Y%m%d').tar.xz}
226228
run_cmd "tar -cp --posix --xattrs -C $ROOTFS . | xz -T${COMPRESSOR_THREADS:-0} -9 > $tarball "
227229

228230
# Now that we have the tarball we don't need the rootfs anymore, so we

0 commit comments

Comments
 (0)