summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-12-19 18:42:10 +0000
committerdavidovski <david@davidovski.xyz>2022-12-19 18:42:10 +0000
commit07d8d2e23590ce649554d9d71350416c7dc37312 (patch)
tree0711e99fa4b624148ab73978c3ae62ef74e48bb5
parent0c95e11ec210548950764b3602ef33339f0bf07f (diff)
Fix file type identificationHEADv1.5.4master
-rw-r--r--xibuild.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/xibuild.sh b/xibuild.sh
index 7964b10..2170a71 100644
--- a/xibuild.sh
+++ b/xibuild.sh
@@ -78,12 +78,13 @@ EOF
extract () {
f=$1
- case "$(file $f)" in
+ case "$(file -b $f)" in
+ *"XZ"*|*"xz"*) tar -Jxf $f;;
*"gzip"*) tar -zxf $f;;
- *"XZ"*) tar -Jxf $f;;
*"bzip2"*) tar -jxf $f;;
*"lzip"*) tar --lzip -xf $f;;
- *"Zip"*) unzip -qq -o $f ;;
+ *"Zip"*|*"zip"*) unzip -qq -o $f ;;
+ *) echo "don't know how to extract file type: $(file $f)"
esac
}
@@ -126,7 +127,11 @@ xibuild_fetch () {
*) fetch_source file://$src_dir/$url
esac
done
- cp -r $src_dir/*.xibuild $root/$build_dir/
+ for xibuild in $src_dir/*.xibuild; do
+ echo "copying $xibuild to $root/$build_dir"
+ cp -r $xibuild $root/$build_dir/
+ file $root/$build_dir/$(basename $xibuild)
+ done
}
xibuild_build () {