1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/vaultwarden_ynh.git synced 2024-09-03 18:26:31 +02:00

simplification

This commit is contained in:
yalh76 2022-09-07 08:02:01 +02:00
parent 797819862b
commit f632174adb

View file

@ -71,7 +71,7 @@ ynh_setup_source_docker() {
src_format=${src_format:-tar.gz}
src_format=$(echo "$src_format" | tr '[:upper:]' '[:lower:]')
src_extract=${src_extract:-true}
if [ "$src_filename" = "" ]; then
if [[ "$src_filename" = "" && "$src_format" != "docker" ]]; then
src_filename="${source_id}.${src_format}"
fi
@ -128,9 +128,7 @@ ynh_setup_source_docker() {
if ! "$src_extract"; then
mv $src_filename $dest_dir
elif [ "$src_format" = "docker" ]; then
$YNH_APP_BASEDIR/scripts/vendor/docker-image-extract -p $src_plateform -o $src_filename $src_url 2>&1
mv $src_filename $dest_dir
ynh_secure_remove --file="$src_filename"
$YNH_APP_BASEDIR/scripts/vendor/docker-image-extract -p $src_plateform -o $dest_dir $src_url 2>&1
elif [ "$src_format" = "zip" ]; then
# Zip format
# Using of a temp directory, because unzip doesn't manage --strip-components