better erro handling
authorIan Kelling <iank@fsf.org>
Wed, 9 Feb 2022 07:14:37 +0000 (02:14 -0500)
committerIan Kelling <iank@fsf.org>
Wed, 9 Feb 2022 07:14:37 +0000 (02:14 -0500)
ex

diff --git a/ex b/ex
index 85317e7d3385d40f8e6b842ad551d260d39e89ee..88470cc826233c9077f14c9349d9e1cd57be1a7a 100755 (executable)
--- a/ex
+++ b/ex
@@ -85,13 +85,17 @@ Note: dtrx (package & command) extracts most of these plus some others."
             *.xz)
               $quiet || echo tar xJf $f
               tar xJf $f
+              rm -f $f
               ;;
             *.gz)
               $quiet || echo tar xzf $f
               tar xzf $f
+              rm -f $f
+              ;;
+            *)
+              echo "ex: ERROR: file i didnt expect: $f"
               ;;
           esac
-          rm -f $f
         done
         ;;
       *.dsc)