History

Add -o <outfile> to mkplatformfs.sh for feature parity

Adam Gausmann committed 6 years ago

Commit 3c12c741 parent 4ffa6891 file · +4 −2Browse files

Unified · Split

mkplatformfs.sh.in+4−2
@@ -61,6 +61,7 @@ Options · 60 unmodified lines
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 · 7 unmodified lines
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 · 2 unmodified lines
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 · 133 unmodified lines
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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t