]> diplodocus.org Git - nmh/commitdiff
sh scripts: Remove `else' after exit at end of then-block.
authorRalph Corderoy <ralph@inputplus.co.uk>
Wed, 23 Aug 2017 20:39:59 +0000 (21:39 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Wed, 23 Aug 2017 22:31:42 +0000 (23:31 +0100)
Only for simple if-then-else-fi with no elif.

test/rcv/test-rcvstore
uip/mhmail

index 6337b89..48bf8c1 100755 (executable)
@@ -183,12 +183,10 @@ if [ "`find ${MH_TEST_DIR}/Mail/test-read-perms -perm 600`"x = ''x ]; then
   if [ ${failed:-0} -eq 0 ]; then
     echo "$Test $0 SKIP (cannot remove read permission on plain files)"
     exit 77
-  else
-    exit $failed
   fi
-else
-  rm -f ${MH_TEST_DIR}/Mail/test-read-perms
+  exit $failed
 fi
+rm -f ${MH_TEST_DIR}/Mail/test-read-perms
 
 # check default Msg-Protect
 msgprot=`mhparam msgprot`
index 09625af..b94886f 100755 (executable)
@@ -299,10 +299,9 @@ else
 
   if "$post_or_send" $postsendargs "$tmpfile"; then
     exit
-  else
-    status=$?
-    mv -f "$tmpfile" dead.letter
-    printf 'Letter saved in dead.letter\n' >&2
-    exit $status
   fi
+  status=$?
+  mv -f "$tmpfile" dead.letter
+  printf 'Letter saved in dead.letter\n' >&2
+  exit $status
 fi