components/quilt/patches/11-fix-gnu-file-b-option.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Thu, 12 May 2016 15:30:11 -0700
changeset 5976 735a0f229abe
parent 3888 394d3b52b99a
permissions -rw-r--r--
Added tag s12-99.2 for changeset 3b31b59da176

Adjust the quilt/setup script to do the equivalent of the GNU file -b option

This patch will be passed upstream

--- quilt/setup.in.orig	2015-02-16 16:11:48.761425804 -0800
+++ quilt/setup.in	2015-02-16 16:13:14.101523600 -0800
@@ -162,7 +162,7 @@
 				filetype="xz"
 				;;
 			*)
-				filetype=$(file -b "$file")
+				filetype=$(file "$file" | sed 's/^.*:[\t ]*//')
 				;;
 		esac
 
@@ -389,7 +389,7 @@
 		"# Source: "*)
 			shift 2
 			source="$@"
-			filetype=$(file -b "$source")
+			filetype=$(file "$source" | sed 's/^.*:[\t ]*//')
 			case "$filetype" in
 			Zip*)
 				echo "unzip ${tar_dir:-.} ${source// /\\ }"