deblob-check: fix tarball verification with tar 1.27
authorlxoliva <lxoliva@559672b5-ba27-0410-b829-e8f1faed8b1b>
Sun, 20 Jul 2014 14:27:42 +0000 (14:27 +0000)
committerlxoliva <lxoliva@559672b5-ba27-0410-b829-e8f1faed8b1b>
Sun, 20 Jul 2014 14:27:42 +0000 (14:27 +0000)
git-svn-id: http://www.fsfla.org/svn/fsfla/software/linux-libre/scripts@11486 559672b5-ba27-0410-b829-e8f1faed8b1b

deblob-check

index 9e7457d85b37ad154a7ab961735c192898dd655b..7c31cb1486e9ad3a2023b35666f81c4ea5ea8339 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# deblob-check version 2014-06-08
+# deblob-check version 2014-07-19
 # Inspired in gNewSense's find-firmware script.
 # Written by Alexandre Oliva <lxoliva@fsfla.org>
 
@@ -7591,7 +7591,19 @@ BAD regular expression:
   # Extract or otherwise munge...
   case /$input in
   *.tar*)
-    cmd="tar -xf - --to-command='echo \";/*begin \$TAR_FILENAME*/;\"; cat; echo; echo \";/*end \$TAR_FILENAME*/;\"'"
+    tarwrap=`mktemp -t deblob-check-tarwrap-XXXXXX`
+    tempfiles="$tempfiles $tarwrap"
+    
+    cat >> $tarwrap <<EOF
+#! /bin/sh
+echo='$echo' &&
+$echo ";/*begin \$1*/;" &&
+cat &&
+echo &&
+$echo ";/*end \$1*/;"
+EOF
+    chmod +x $tarwrap
+    cmd="tar -xf - --to-command='$tarwrap \"\$TAR_FILENAME\"'"
     ;;
   *.patch | *.patch.*z* | */patch-* | *.diff | *.diff.*z*)
     if $reverse_patch; then