mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
add xz decompression for sources
This commit is contained in:
parent
b8b8eb14f4
commit
56c45133b6
1 changed files with 10 additions and 0 deletions
|
@ -201,6 +201,9 @@ ynh_setup_source() {
|
||||||
elif [[ "$src_url" =~ ^.*\.tar\.bz2$ ]]
|
elif [[ "$src_url" =~ ^.*\.tar\.bz2$ ]]
|
||||||
then
|
then
|
||||||
src_format="tar.bz2"
|
src_format="tar.bz2"
|
||||||
|
elif [[ "$src_url" =~ ^.*\.xz$ ]]
|
||||||
|
then
|
||||||
|
src_format="xz"
|
||||||
elif [[ -z "$src_extract" ]]
|
elif [[ -z "$src_extract" ]]
|
||||||
then
|
then
|
||||||
src_extract="false"
|
src_extract="false"
|
||||||
|
@ -329,6 +332,13 @@ ynh_setup_source() {
|
||||||
unzip -quo $src_filename -d "$dest_dir"
|
unzip -quo $src_filename -d "$dest_dir"
|
||||||
fi
|
fi
|
||||||
ynh_secure_remove --file="$src_filename"
|
ynh_secure_remove --file="$src_filename"
|
||||||
|
elif [[ "$src_format" == "xz" ]]; then
|
||||||
|
if [[ -z "$src_rename" ]]; then
|
||||||
|
xz -d --stdout $src_filename > "$dest_dir/$(basename $src_filename)"
|
||||||
|
else
|
||||||
|
xz -d --stdout $src_filename > "$dest_dir/$src_rename"
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
local strip=""
|
local strip=""
|
||||||
if [ "$src_in_subdir" != "false" ]; then
|
if [ "$src_in_subdir" != "false" ]; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue