Add --chroot-scripts and --scripts to getopt parsing
[grml-debootstrap.git] / cmdlineopts.clp
index 496626c..9ab44dc 100644 (file)
@@ -13,7 +13,7 @@
 ################################################################################
 
 _opt_temp=`getopt --name grml-debootstrap -o +m:i:r:t:p:c:d:vhV --long \
-    mirror:,iso:,release:,target:,mntpoint:,debopt:,interactive,nodebootstrap,config:,confdir:,packages::,debconf::,keep_src_list,hostname:,password:,bootappend:,groot:,grub:,verbose,help,version \
+    mirror:,iso:,release:,target:,mntpoint:,debopt:,interactive,nodebootstrap,config:,confdir:,packages::,chroot-scripts::,scripts::,debconf::,keep_src_list,hostname:,password:,bootappend:,groot:,grub:,verbose,help,version \
   -- "$@"`
 if [ $? != 0 ]; then
   eerror "Try 'grml-debootstrap --help' for more information."; eend 1; exit 1
@@ -65,6 +65,14 @@ while :; do
     shift; _opt_debconf="$1"
     _opt_debconf_set=T
     ;;
+  --scripts)           # Execute scripts from <confdir>/scripts/. Option
+    shift; _opt_scripts="$1"
+    _opt_scripts_set=T
+    ;;
+  --chroot-scripts)   # Execute scripts from <confdir>/chroot-scripts/. Option
+    shift; _opt_chroot_scripts_set="$1"
+    _opt_chroot_scripts_set=T
+    ;;
   --keep_src_list)     # Do not overwrite user provided apt sources.list.
     _opt_keep_src_list=T
     ;;
@@ -74,7 +82,6 @@ while :; do
   --password)          # Use specified password as password for user root.
     shift; _opt_password="$1"
     ;;
-  #
   --bootappend)        # Add specified appendline to kernel whilst booting.
     shift; _opt_bootappend="$1"
     ;;