mirror of
https://github.com/YunoHost-Apps/piwigo_ynh.git
synced 2024-09-03 20:06:03 +02:00
21 lines
No EOL
603 B
Bash
21 lines
No EOL
603 B
Bash
#
|
|
# Common variables
|
|
#
|
|
|
|
# Application version
|
|
VERSION="2.8.5"
|
|
|
|
# Remote URL to fetch application source archive
|
|
APPLICATION_SOURCE_URL="http://piwigo.org/download/dlcounter.php?code=${VERSION}"
|
|
|
|
# Download and extract application sources to the given directory
|
|
# usage: extract_application_to DESTDIR
|
|
extract_application() {
|
|
local DESTDIR=$1
|
|
archive="${DESTDIR}/application.zip"
|
|
wget -q -O "$archive" "$APPLICATION_SOURCE_URL" \
|
|
|| ynh_die "Unable to download application archive"
|
|
sudo unzip -qq "$archive" -d "$DESTDIR" \
|
|
|| ynh_die "Unable to extract application archive"
|
|
rm "$archive"
|
|
} |