mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Simplification
This commit is contained in:
parent
7695dede06
commit
96d40556dd
2 changed files with 2 additions and 5 deletions
|
@ -132,7 +132,7 @@ ynh_setup_source() {
|
||||||
src_format=${src_format:-tar.gz}
|
src_format=${src_format:-tar.gz}
|
||||||
src_format=$(echo "$src_format" | tr '[:upper:]' '[:lower:]')
|
src_format=$(echo "$src_format" | tr '[:upper:]' '[:lower:]')
|
||||||
src_extract=${src_extract:-true}
|
src_extract=${src_extract:-true}
|
||||||
if [ "$src_filename" = "" ]; then
|
if [[ "$src_filename" = "" && "$src_format" != "docker" ]]; then
|
||||||
src_filename="${source_id}.${src_format}"
|
src_filename="${source_id}.${src_format}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -189,9 +189,7 @@ ynh_setup_source() {
|
||||||
if ! "$src_extract"; then
|
if ! "$src_extract"; then
|
||||||
mv $src_filename $dest_dir
|
mv $src_filename $dest_dir
|
||||||
elif [ "$src_format" = "docker" ]; then
|
elif [ "$src_format" = "docker" ]; then
|
||||||
/usr/share/yunohost/helpers.d/vendor/docker-image-extract -p $src_plateform -o $src_filename $src_url 2>&1
|
/usr/share/yunohost/helpers.d/vendor/docker-image-extract -p $src_plateform -o $dest_dir $src_url 2>&1
|
||||||
mv $src_filename $dest_dir
|
|
||||||
ynh_secure_remove --file="$src_filename"
|
|
||||||
elif [ "$src_format" = "zip" ]; then
|
elif [ "$src_format" = "zip" ]; then
|
||||||
# Zip format
|
# Zip format
|
||||||
# Using of a temp directory, because unzip doesn't manage --strip-components
|
# Using of a temp directory, because unzip doesn't manage --strip-components
|
||||||
|
|
1
helpers/vendor/docker-image-extract
vendored
1
helpers/vendor/docker-image-extract
vendored
|
@ -1,5 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# This script pulls and extracts all files from an image in Docker Hub.
|
# This script pulls and extracts all files from an image in Docker Hub.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Reference in a new issue