diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/selfstrap | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/selfstrap b/src/selfstrap index 72fda34..4492d67 100755 --- a/src/selfstrap +++ b/src/selfstrap | |||
@@ -16,17 +16,19 @@ usage() | |||
16 | --chroot=<prog> Use prog for chroot command | 16 | --chroot=<prog> Use prog for chroot command |
17 | --packages=<file> Text file contains names of packages to install | 17 | --packages=<file> Text file contains names of packages to install |
18 | --real-apt Use 'apt-get install' to install packages | 18 | --real-apt Use 'apt-get install' to install packages |
19 | --skip-update Do not run 'apt-get update' at startup | ||
19 | EOF | 20 | EOF |
20 | exit ${1:-1} | 21 | exit ${1:-1} |
21 | } | 22 | } |
22 | 23 | ||
23 | GETOPT=$(getopt -n "${0##*/}" -o t:hv --long help,target:,verbose,unpack,chroot:,packages:,real-apt -- "$@") || exit | 24 | GETOPT=$(getopt -n "${0##*/}" -o t:hv --long help,target:,verbose,unpack,chroot:,packages:,real-apt,skip-update -- "$@") || exit |
24 | eval set -- "$GETOPT" | 25 | eval set -- "$GETOPT" |
25 | while [ $# -gt 0 ]; do | 26 | while [ $# -gt 0 ]; do |
26 | case "$1" in | 27 | case "$1" in |
27 | -t|--target) TARGET=$2; shift ;; | 28 | -t|--target) TARGET=$2; shift ;; |
28 | -h|--help) usage 0 ;; | 29 | -h|--help) usage 0 ;; |
29 | -v|--verbose) VERBOSE=y ;; | 30 | -v|--verbose) VERBOSE=y ;; |
31 | --skip-update) SKIP_UPDATE=y ;; | ||
30 | --unpack) UNPACK_ONLY=y; die 'unimplemented' ;; | 32 | --unpack) UNPACK_ONLY=y; die 'unimplemented' ;; |
31 | --packages) x=$(cat < "$2") || die "could not read file '$2'" | 33 | --packages) x=$(cat < "$2") || die "could not read file '$2'" |
32 | EXTRA_PACKAGES="$EXTRA_PACKAGES $x" | 34 | EXTRA_PACKAGES="$EXTRA_PACKAGES $x" |