summaryrefslogtreecommitdiff
path: root/src/selfstrap
diff options
context:
space:
mode:
Diffstat (limited to 'src/selfstrap')
-rwxr-xr-xsrc/selfstrap4
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
19EOF 20EOF
20 exit ${1:-1} 21 exit ${1:-1}
21} 22}
22 23
23GETOPT=$(getopt -n "${0##*/}" -o t:hv --long help,target:,verbose,unpack,chroot:,packages:,real-apt -- "$@") || exit 24GETOPT=$(getopt -n "${0##*/}" -o t:hv --long help,target:,verbose,unpack,chroot:,packages:,real-apt,skip-update -- "$@") || exit
24eval set -- "$GETOPT" 25eval set -- "$GETOPT"
25while [ $# -gt 0 ]; do 26while [ $# -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"