The following commit has been merged in the master branch:
commit 84dd95288a16cd821d8fdeaae2207ac08189e0bb
Author: Benjamin Drung <[email protected]>
Date:   Fri Mar 9 02:16:58 2012 +0100

    edit-patch: Remove trailing .sh when checking if the script is being run as 
edit-patch or add-patch.
    
    Thanks: Michael Hall <[email protected]>

diff --git a/scripts/edit-patch.sh b/scripts/edit-patch.sh
index 2843775..19a11c5 100755
--- a/scripts/edit-patch.sh
+++ b/scripts/edit-patch.sh
@@ -293,10 +293,12 @@ main() {
     normalize_patch_path
     normalize_patch_extension
     handle_file_patch
-    if [ "$(basename $0)" = "edit-patch" ]; then
+    if [ "$(basename $0|sed -e s/.sh\$//)" = "edit-patch" ]; then
         edit_patch_$PATCHSYSTEM $PATCHNAME
-    elif [ "$(basename $0)" = "add-patch" ]; then
+    elif [ "$(basename $0|sed -e s/.sh\$//)" = "add-patch" ]; then
         add_patch_$PATCHSYSTEM $1 $PATCHNAME
+    else
+        fatal_error "Unknown script name: $0"
     fi
     add_patch_tagging $PATCHNAME
     add_changelog $PATCHNAME

-- 
Git repository for devscripts


-- 
To unsubscribe, send mail to [email protected].

Reply via email to