mirror of
https://github.com/YunoHost-Apps/vaultwarden_ynh.git
synced 2024-09-03 18:26:31 +02:00
Move common code to _common.sh
This commit is contained in:
parent
00144b9f69
commit
b350d66d37
3 changed files with 14 additions and 14 deletions
|
@ -10,6 +10,17 @@ pkg_image="vaultwarden/server"
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
_download_vaultwarden_from_docker() {
|
||||||
|
|
||||||
|
# Download, check integrity, uncompress the source of vaultwarden from app.src to his build directory
|
||||||
|
docker_arg=""
|
||||||
|
# Fixup for armhf
|
||||||
|
if [ $YNH_ARCH == "armhf" ]; then
|
||||||
|
docker_arg="--os_arch_variant=linux/arm/v7"
|
||||||
|
fi
|
||||||
|
ynh_docker_image_extract --dest_dir="$install_dir/build/" --image_spec="$pkg_image:$(ynh_app_upstream_version)" $docker_arg
|
||||||
|
}
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# EXPERIMENTAL HELPERS
|
# EXPERIMENTAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -29,13 +29,8 @@ ynh_app_setting_set --app=$app --key=admin_token --value=$admin_token
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Setting up source files..."
|
ynh_script_progression --message="Setting up source files..."
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
_download_vaultwarden_from_docker
|
||||||
docker_arg=""
|
|
||||||
if [ $YNH_ARCH == "armhf" ]
|
|
||||||
then
|
|
||||||
docker_arg="--os_arch_variant=linux/arm/v7"
|
|
||||||
fi
|
|
||||||
ynh_docker_image_extract --dest_dir="$install_dir/build/" --image_spec="$pkg_image:$(ynh_app_upstream_version)" $docker_arg
|
|
||||||
mkdir -p "$install_dir/live/"
|
mkdir -p "$install_dir/live/"
|
||||||
|
|
||||||
chmod 750 "$install_dir"
|
chmod 750 "$install_dir"
|
||||||
|
|
|
@ -33,13 +33,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading source files..."
|
ynh_script_progression --message="Upgrading source files..."
|
||||||
|
|
||||||
# Download, check integrity, uncompress the source of vaultwarden from app.src to his build directory
|
_download_vaultwarden_from_docker
|
||||||
docker_arg=""
|
|
||||||
if [ $YNH_ARCH == "armhf" ]
|
|
||||||
then
|
|
||||||
docker_arg="--os_arch_variant=linux/arm/v7"
|
|
||||||
fi
|
|
||||||
ynh_docker_image_extract --dest_dir="$install_dir/build/" --image_spec="$pkg_image:$(ynh_app_upstream_version)" $docker_arg
|
|
||||||
mkdir -p "$install_dir/live/"
|
mkdir -p "$install_dir/live/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue