OSDN Git Service

Syntax fix of the previous modification.
authorMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Sat, 28 Jul 2018 17:49:33 +0000 (01:49 +0800)
committerMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Sat, 28 Jul 2018 17:49:33 +0000 (01:49 +0800)
 Changes to be committed:
modified:   lib/libmain.sh
modified:   lib/libreinstall.sh

lib/libmain.sh
lib/libreinstall.sh

index fd8553d..ea210c9 100644 (file)
@@ -12,7 +12,7 @@ main_set_version ()
        MYVERSION=4.1.0
        COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9])$'
        # Template for development versions
-       MYVERSION=4.0.0+toward_4.1.0_20180729004614
+       MYVERSION=4.0.0+toward_4.1.0_20180729014915
        COMPATIBLE_VERSIONS='^(4\.[0-1]\.[0-9]]|4\.[0]\.[0]+(|\+toward_4\.[0]\.[1]+_[0-9]+))$'
 }
 
index 6f131cb..db22077 100644 (file)
@@ -764,7 +764,7 @@ reinstall_fetch_missing_distfiles ()
        done | grep -v '^[[:space:]]*$' > $tmp_fetch.main || :
        [ -e "$tmp_fetch.pre" ] && sort -u "$tmp_fetch.pre"
        cat "$tmp_fetch.main"
-}      
+}
 
 # ============= Execute a command by recording the standard output and error output into a file in case of error =============
 reinstall_execcmd_tee_errlog ()
@@ -773,7 +773,9 @@ reinstall_execcmd_tee_errlog ()
        func=$1
        tmp_err=${TMPDIR}/reinstall_execcmd_tee_errlog::error
        rm -f "$tmp_err"
-       { eval "$func"; } 2>&1 || touch "$tmp_err"; } | tee "$REINSTALL_DBNODE_DIR/error.log"
+       {
+               $func
+       } 2>&1 || touch "$tmp_err"; } | tee "$REINSTALL_DBNODE_DIR/error.log"
        [ -e "$tmp_err" ] && return 1
        rm -f "$REINSTALL_DBNODE_DIR/error.log"
        return
@@ -1318,7 +1320,7 @@ reinstall_exec ()
                        message_echo "INFO: Retrying the build process after cleaning for $REINSTALL_ORIGPKGTAG."
                        _reinstall_exec__tmpcmd () { reinstall_make clean; }
                        if ! reinstall_execcmd_tee_errlog _reinstall_exec__tmpcmd
-                       {
+                       then
                                if pkgsys_is_necessary_pkgtool "$REINSTALL_ORIGIN"
                                then
                                        pkg_is_tool_available || pkg_rescue_tools
@@ -1328,11 +1330,11 @@ reinstall_exec ()
                                reinstall_errproc 'build and clean after build failure'
                                temp_set_msg_current_stage "${_MSG_CURRENT_STAGE_general}"
                                return
-                       }
+                       fi
                        reinstall_register_stage_complete CLEAN_BEFORE_BUILD
                        _reinstall_exec__tmpcmd () { reinstall_make build MAKE_JOBS_UNSAFE=yes; }
                        if ! reinstall_execcmd_tee_errlog _reinstall_exec__tmpcmd
-                       {
+                       then
                                if pkgsys_is_necessary_pkgtool "$REINSTALL_ORIGIN"
                                then
                                        pkg_is_tool_available || pkg_rescue_tools
@@ -1342,7 +1344,7 @@ reinstall_exec ()
                                reinstall_errproc 'retrial of build after failure'
                                temp_set_msg_current_stage "${_MSG_CURRENT_STAGE_general}"
                                return
-                       }
+                       fi
                        reinstall_deregister_stage in_retrial_build
                fi
                if pkgsys_is_necessary_pkgtool "$REINSTALL_ORIGIN"
@@ -1437,11 +1439,11 @@ reinstall_exec ()
                                ! reinstall_chk_stage_complete FAILED_INSTALL.AFTERINSTALL
                        then
                                message_echo "-- AFTERINSTALL operations (start)"
-                               sh -e "$REINSTALL_DBNODE_DIR/AFTERINSTALL.conf" || \
-                               {
+                               if ! sh -e "$REINSTALL_DBNODE_DIR/AFTERINSTALL.conf"
+                               then
                                        message_echo "WARNING: Failed in AFTERINSTALL operations." >&2
                                        message_echo "---- (The process is continued anyway)"
-                               }
+                               fi
                                message_echo "-- AFTERINSTALL operations (end)"
                                reinstall_register_stage_complete FAILED_INSTALL.AFTERINSTALL
                        fi
@@ -1496,10 +1498,10 @@ reinstall_exec ()
        reinstall_restore_conflicts "$REINSTALL_ORIGIN"
        if ! reinstall_chk_stage_complete CLEAN_AFTER_INSTALL
        then
-               reinstall_make clean || \
-               {
+               if ! reinstall_make clean
+               then
                        message_echo "WARNING: Failed to clean $REINSTALL_ORIGPKGTAG." >&2
-               }
+               fi
                reinstall_register_stage_complete CLEAN_AFTER_INSTALL
        fi
        reinstall_tell_update_to_depandents