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
62 -h Show this help62 -h Show this help
63 -r <repo> Set XBPS repository (may be set multiple times)63 -r <repo> Set XBPS repository (may be set multiple times)
64 -x <num> Use <num> threads to compress the image (dynamic if unset)64 -x <num> Use <num> threads to compress the image (dynamic if unset)
65 -o <file> Filename to write the ROOTFS archive to
65 -V Show version66 -V Show version
66_EOF67_EOF
67}68}
@@ -72,13 +73,14 @@ _EOF · 4 unmodified lines
72 73
73# Boilerplate option parsing. This script supports the bare minimum74# Boilerplate option parsing. This script supports the bare minimum
74# needed to build an image.75# needed to build an image.
75while getopts "C:c:h:r:x:V" opt; do76while getopts "C:c:h:r:x:o:V" opt; do
76 case $opt in77 case $opt in
77 C) XBPS_CONFFILE="-C $OPTARG";;78 C) XBPS_CONFFILE="-C $OPTARG";;
78 c) XBPS_CACHEDIR="--cachedir=$OPTARG";;79 c) XBPS_CACHEDIR="--cachedir=$OPTARG";;
79 h) usage; exit 0;;80 h) usage; exit 0;;
80 r) XBPS_REPOSITORY="$XBPS_REPOSITORY --repository=$OPTARG";;81 r) XBPS_REPOSITORY="$XBPS_REPOSITORY --repository=$OPTARG";;
81 x) COMPRESSOR_THREADS="$OPTARG" ;;82 x) COMPRESSOR_THREADS="$OPTARG" ;;
83 o) FILENAME="$OPTARG" ;;
82 V) echo "$PROGNAME @@MKLIVE_VERSION@@"; exit 0;;84 V) echo "$PROGNAME @@MKLIVE_VERSION@@"; exit 0;;
83 esac85 esac
84done86done
@@ -206,7 +208,7 @@ rm -rf "$ROOTFS/var/cache/*" 2>/dev/null · 121 unmodified lines
206 208
207# Finally we can compress the tarball, the name will include the209# Finally we can compress the tarball, the name will include the
208# architecture and the date on which the tarball was built.210# architecture and the date on which the tarball was built.
209tarball=void-${XBPS_TARGET_ARCH}-ROOTFS-$(date '+%Y%m%d').tar.xz211tarball=${FILENAME-void-${XBPS_TARGET_ARCH}-ROOTFS-$(date '+%Y%m%d').tar.xz}
210run_cmd "tar -cp --posix --xattrs -C $ROOTFS . | xz -T${COMPRESSOR_THREADS:-0} -9 > $tarball "212run_cmd "tar -cp --posix --xattrs -C $ROOTFS . | xz -T${COMPRESSOR_THREADS:-0} -9 > $tarball "
211 213
212# Now that we have the tarball we don't need the rootfs anymore, so we214# 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