]> git.ozlabs.org Git - next-scripts/blobdiff - import-akpm
abstract out check_unmerged files
[next-scripts] / import-akpm
index ef85f1f1ee9c305dba06b3d09bcee52abc9f2ab6..ac5750446e3821314eab48108da740bab2c86709 100755 (executable)
@@ -2,6 +2,9 @@
 
 export LOG_FILE=../akpm-import.log
 
+# shellcheck source=./common.sh
+. "$(dirname "$0")/common.sh" ''
+
 log()
 {
        echo "$@" | tee -a $LOG_FILE
@@ -67,12 +70,8 @@ for f in $patches; do
                execute git branch tmp-akpm/current ||
                        $SHELL -i || exit
                execute git merge --no-edit --no-stat "$dnb" || {
-                       umf=$(git diff 2>&1 | sed -n 's/^\* Unmerged path //p')
-                       [ "$umf" ] && [ -f "../merge-files/akpm-current" ] && {
-                               rmf=$(grep -F "$umf" "../merge-files/akpm-current")
-                               [ "$rmf" ] &&
-                                       "$bin_dir/do_rm" $rmf
-                       }
+                       check_unmerged_files akpm-current
+
                        git diff 2>&1 | grep -E -q '<<<<<|^\*' && {
                                $SHELL -i || exit
                        }