components/quilt/patches/11-fix-gnu-file-b-option.patch
author Rich Burridge <rich.burridge@oracle.com>
Tue, 18 Apr 2017 08:40:16 -0700
changeset 7896 0f03c7e0b475
parent 3888 394d3b52b99a
permissions -rw-r--r--
25675711 Update cmake to version 3.7

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// /\\ }"