mirror of
https://github.com/YunoHost-Apps/piwigo_ynh.git
synced 2024-09-03 20:06:03 +02:00
Upgrade to Piwigo 2.8.5
This commit is contained in:
parent
c5d7cfdbf3
commit
86d4bc2833
4 changed files with 35 additions and 15 deletions
|
@ -5,7 +5,7 @@ Piwigo for YunoHost
|
|||
|
||||
Extensions make Piwigo easily customizable. Icing on the cake, Piwigo is free and opensource.
|
||||
|
||||
**Shipped version:** 2.8.3
|
||||
**Shipped version:** 2.8.5
|
||||
|
||||
![](http://piwigo.org/screenshots/homepage/piwigo-batch-manager.png)
|
||||
|
||||
|
|
21
scripts/_common.sh
Normal file
21
scripts/_common.sh
Normal file
|
@ -0,0 +1,21 @@
|
|||
#
|
||||
# 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"
|
||||
}
|
|
@ -5,6 +5,9 @@ set -eu
|
|||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
# Source local helpers
|
||||
source ./_common.sh
|
||||
|
||||
# Retrieve arguments
|
||||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path=$YNH_APP_ARG_PATH
|
||||
|
@ -30,11 +33,8 @@ ynh_app_setting_set "$app" language "$language"
|
|||
sudo yunohost app checkurl "${domain}${path}" -a "$app" \
|
||||
|| ynh_die "Path not available: ${domain}${path}"
|
||||
|
||||
# Download sources
|
||||
sudo wget -q http://piwigo.org/download/dlcounter.php?code=2.8.3 -O piwigo.zip
|
||||
|
||||
# Uncompress
|
||||
sudo unzip -qq piwigo.zip -d ..
|
||||
# Download and extract application
|
||||
extract_application ..
|
||||
|
||||
# Copy source files
|
||||
src_path=/var/www/$app
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
#!/bin/bash
|
||||
# =====================
|
||||
# TODO
|
||||
# =====================
|
||||
|
||||
# Exit on command errors and treat unset variables as an error
|
||||
set -eu
|
||||
|
||||
shopt -s extglob # sets extended pattern matching options in the bash shell
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
# Source local helpers
|
||||
source ./_common.sh
|
||||
|
||||
# Source YunoHost helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
|
@ -21,16 +23,13 @@ language=$(ynh_app_setting_get "$app" language)
|
|||
# Remove trailing "/" for next commands
|
||||
path=${path%/}
|
||||
|
||||
# Download sources
|
||||
sudo wget -q http://piwigo.org/download/dlcounter.php?code=2.8.3 -O piwigo.zip
|
||||
|
||||
# Uncompress
|
||||
sudo unzip -qq piwigo.zip -d ../
|
||||
# Download and extract application
|
||||
extract_application ..
|
||||
|
||||
# Copy source files
|
||||
src_path=/var/www/$app
|
||||
sudo mkdir -p $src_path
|
||||
sudo cp -Raf ../piwigo/. $src_path
|
||||
sudo cp -Raf ../piwigo/!(upload) $src_path
|
||||
|
||||
datapath=/home/yunohost.app/$app
|
||||
|
||||
|
|
Loading…
Reference in a new issue