History

mkrootfs.sh.in: support arbitrary filenames

Michael Aldridge committed 9 years ago

Commit 9debeaf1 parent aa0920f1 file · +4 −2Browse files

Unified · Split

mkrootfs.sh.in+4−2
@@ -62,6 +62,7 @@ Options · 61 unmodified lines
6262 -h Show this help
6363 -r <repo> Set XBPS repository (may be set multiple times)
6464 -x <num> Use <num> threads to compress the image (dynamic if unset)
65+ -o <file> Filename to write the ROOTFS archive to
6566 -V Show version
6667 _EOF
6768 }
@@ -72,13 +73,14 @@ _EOF · 4 unmodified lines
7273
7374 # Boilerplate option parsing. This script supports the bare minimum
7475 # needed to build an image.
75−while getopts "C:c:h:r:x:V" opt; do
76+while getopts "C:c:h:r:x:o:V" opt; do
7677 case $opt in
7778 C) XBPS_CONFFILE="-C $OPTARG";;
7879 c) XBPS_CACHEDIR="--cachedir=$OPTARG";;
7980 h) usage; exit 0;;
8081 r) XBPS_REPOSITORY="$XBPS_REPOSITORY --repository=$OPTARG";;
8182 x) COMPRESSOR_THREADS="$OPTARG" ;;
83+ o) FILENAME="$OPTARG" ;;
8284 V) echo "$PROGNAME @@MKLIVE_VERSION@@"; exit 0;;
8385 esac
8486 done
@@ -206,7 +208,7 @@ rm -rf "$ROOTFS/var/cache/*" 2>/dev/null · 121 unmodified lines
206208
207209 # Finally we can compress the tarball, the name will include the
208210 # architecture and the date on which the tarball was built.
209−tarball=void-${XBPS_TARGET_ARCH}-ROOTFS-$(date '+%Y%m%d').tar.xz
211+tarball=${FILENAME-void-${XBPS_TARGET_ARCH}-ROOTFS-$(date '+%Y%m%d').tar.xz}
210212 run_cmd "tar -cp --posix --xattrs -C $ROOTFS . | xz -T${COMPRESSOR_THREADS:-0} -9 > $tarball "
211213
212214 # 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