Fix rpm2cpio.sh error exit on unrecognized compression
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 15 Mar 2012 09:41:40 +0000 (11:41 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 15 Mar 2012 09:41:40 +0000 (11:41 +0200)
- This is not a function so it needs to be exit, not return.
  Reported as a side-note in RhBug:803421.

scripts/rpm2cpio.sh

index e77be84..57c47bb 100755 (executable)
@@ -34,5 +34,5 @@ case "$comp" in
     "$gz"*)   dd if="$pkg" ibs=$o skip=1 2>/dev/null | gunzip ;;
     "$xz"*)   dd if="$pkg" ibs=$o skip=1 2>/dev/null | xzcat ;;
     "$lzma"*) dd if="$pkg" ibs=$o skip=1 2>/dev/null | unlzma ;;
-    *)        echo "Unrecognized rpm file: $pkg"; return 1 ;;
+    *)        echo "Unrecognized rpm file: $pkg"; exit 1 ;;
 esac