Unified · Split
| @@ -62,6 +62,7 @@ Options · 61 unmodified lines | ||
| 62 | 62 | -h Show this help |
| 63 | 63 | -r <repo> Set XBPS repository (may be set multiple times) |
| 64 | 64 | -x <num> Use <num> threads to compress the image (dynamic if unset) |
| 65 | + -o <file> Filename to write the ROOTFS archive to | |
| 65 | 66 | -V Show version |
| 66 | 67 | _EOF |
| 67 | 68 | } |
| @@ -72,13 +73,14 @@ _EOF · 4 unmodified lines | ||
| 72 | 73 | |
| 73 | 74 | # Boilerplate option parsing. This script supports the bare minimum |
| 74 | 75 | # 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 | |
| 76 | 77 | case $opt in |
| 77 | 78 | C) XBPS_CONFFILE="-C $OPTARG";; |
| 78 | 79 | c) XBPS_CACHEDIR="--cachedir=$OPTARG";; |
| 79 | 80 | h) usage; exit 0;; |
| 80 | 81 | r) XBPS_REPOSITORY="$XBPS_REPOSITORY --repository=$OPTARG";; |
| 81 | 82 | x) COMPRESSOR_THREADS="$OPTARG" ;; |
| 83 | + o) FILENAME="$OPTARG" ;; | |
| 82 | 84 | V) echo "$PROGNAME @@MKLIVE_VERSION@@"; exit 0;; |
| 83 | 85 | esac |
| 84 | 86 | done |
| @@ -206,7 +208,7 @@ rm -rf "$ROOTFS/var/cache/*" 2>/dev/null · 121 unmodified lines | ||
| 206 | 208 | |
| 207 | 209 | # Finally we can compress the tarball, the name will include the |
| 208 | 210 | # 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} | |
| 210 | 212 | run_cmd "tar -cp --posix --xattrs -C $ROOTFS . | xz -T${COMPRESSOR_THREADS:-0} -9 > $tarball " |
| 211 | 213 | |
| 212 | 214 | # Now that we have the tarball we don't need the rootfs anymore, so we |