OSDN Git Service

Bug fix in parsing arguments.
authorMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Sun, 26 Aug 2018 16:53:03 +0000 (00:53 +0800)
committerMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Sun, 26 Aug 2018 16:53:03 +0000 (00:53 +0800)
 Changes to be committed:
modified:   bin/portsreinstall
modified:   bin/portsreinstall-chroot
modified:   lib/chroot-mount/libcommand.sh
modified:   lib/chroot/libcommand.sh
modified:   lib/libmain.sh
modified:   lib/main/libcommand.sh
modified:   share/bin/portsreinstall-chroot-mount
modified:   share/bin/portsreinstall-upgrade

bin/portsreinstall
bin/portsreinstall-chroot
lib/chroot-mount/libcommand.sh
lib/chroot/libcommand.sh
lib/libmain.sh
lib/main/libcommand.sh
share/bin/portsreinstall-chroot-mount
share/bin/portsreinstall-upgrade

index af657f4..d676df9 100755 (executable)
@@ -64,7 +64,7 @@ database_maintain_reset_execflag
 # ==================================================
 
 main_parse_options_arguments "$@"
-shift "${OPTIONS_SHIFT}"
+shift "${COMMAND_SHIFT}"
 
 # ========================================================
 # ================== SET UP OF PARAMETERS ==================
index f4facbf..72b47d7 100755 (executable)
@@ -69,7 +69,7 @@ fs_save_current_systembase ''
 # ==================================================
 
 main_parse_options_arguments "$@"
-shift "${OPTIONS_SHIFT}"
+shift "${COMMAND_SHIFT}"
 
 fs_safeguard_basedir "$opt_basedir"
 
index e41d7be..edc3b94 100644 (file)
@@ -22,12 +22,12 @@ command_all_parse_args ()
                exit 1
                ;;
        esac
+       COMMAND_SHIFT=$(($num_args_init - $#))
 }
 
 # ============= Execute command operations which do not need package tools =============
 command_all_exec_without_pkgtools ()
 {
-       shift || :
        case $COMMAND_MODE in
        mount )
                fs_mount
index 3bbc2ba..46316bb 100644 (file)
@@ -163,7 +163,6 @@ command_all_exec_main ()
 {
        case $COMMAND_MODE in
        do | auto )
-               shift || :
                command_do_pre
                command_do_starter_portsnap
                command_do_starter_pkg
index dd35ad5..581a3e6 100644 (file)
@@ -12,7 +12,7 @@ main_set_version ()
        MYVERSION=4.1.0
        COMPATIBLE_VERSIONS='^(4\.[1]\.[0-9])$'
        # Template for development versions
-       MYVERSION=4.0.0+toward_4.1.0_20180826163929
+       MYVERSION=4.0.0+toward_4.1.0_20180827005243
        COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9]]|4\.[0]\.[0]+(|\+toward_4\.[0-1]\.[0-9]+_[0-9]+))$'
 }
 
@@ -79,7 +79,6 @@ main_parse_options_arguments ()
 
        # ============= Argument check for conventional runs =============
        command_all_parse_args "$@"
-       shift "${COMMAND_SHIFT}"
 }
 
 # ============= Define the common termination messages =============
index f6c210d..dac453f 100644 (file)
@@ -302,7 +302,6 @@ command_exec_without_pkgtools__notify_reset_options ()
 # ============= Execute command operations which do not need package tools =============
 command_all_exec_without_pkgtools ()
 {
-       shift || :
        case $COMMAND_MODE in
        clean | load )
                command_exec_without_pkgtools__notify_reset_options
@@ -326,7 +325,6 @@ command_all_exec_without_pkgtools ()
 command_all_exec_irrespective_of_saved_options ()
 {
        local arcfile origins_match pkgs_match
-       shift || :
        case $COMMAND_MODE in
        ok )
                _command_exec_irrespective_of_saved_options__notify_ignored_options
@@ -464,7 +462,6 @@ command_all_exec_irrespective_of_saved_options ()
 command_all_exec_before_tools_upgrade ()
 {
        local glob origins errno
-       shift || :
        case $COMMAND_MODE in
        reset )
                message_echo "Starting to reset the temporary database by preserving the initial snapshot of installed packages..."
@@ -483,7 +480,7 @@ command_all_exec_before_tools_upgrade ()
                exit
                ;;
        show )
-               command_show
+               command_show "$@"
                exit
                ;;
        make )
index ab4507b..91ca276 100755 (executable)
@@ -70,7 +70,7 @@ fs_save_current_systembase "${SYSTEMBASE}"
 # ==================================================
 
 main_parse_options_arguments "$@"
-shift "${OPTIONS_SHIFT}"
+shift "${COMMAND_SHIFT}"
 opt_invalidate_mount_privilege=no
 
 # ========================================================
index cb6db1e..09d648f 100644 (file)
@@ -66,7 +66,7 @@ database_maintain_reset_execflag
 # ==================================================
 
 main_parse_options_arguments "$@"
-shift "${OPTIONS_SHIFT}"
+shift "${COMMAND_SHIFT}"
 
 # ========================================================
 # ================== SET UP OF PARAMETERS ==================