diff options
author | davidovski <david@davidovski.xyz> | 2022-12-19 18:42:10 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-12-19 18:42:10 +0000 |
commit | 07d8d2e23590ce649554d9d71350416c7dc37312 (patch) | |
tree | 0711e99fa4b624148ab73978c3ae62ef74e48bb5 /xibuild.sh | |
parent | 0c95e11ec210548950764b3602ef33339f0bf07f (diff) |
Diffstat (limited to 'xibuild.sh')
-rw-r--r-- | xibuild.sh | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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 () { |