File nextcloud-apps.helper.sh of Package nextcloud
#!/bin/bash
#
# Nextcloud Apps package creator helper
#
# (c) 2024 by Scorpio IT, Deidesheim, DE
# Author: Christian Wittmer <sit.cwi@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
##############################################################################
scApps=(
files_antivirus-v5.5.7.tar.gz
twofactor_admin.tar.gz
twofactor_email.tar.gz
twofactor_reminder.tar.gz
)
scAppsUrl=(
https://github.com/nextcloud-releases/files_antivirus/releases/download/v5.5.7/files_antivirus-v5.5.7.tar.gz
https://github.com/nextcloud-releases/twofactor_admin/releases/download/v4.5.0/twofactor_admin.tar.gz
https://github.com/nursoda/twofactor_email/releases/download/2.7.4/twofactor_email.tar.gz
https://github.com/rullzer/twofactor_reminder/releases/download/v1.1.0/twofactor_reminder.tar.gz
)
scAppCount=0
for scDIR in apps dwnld; do
[[ ! -d "${scDIR}" ]] && mkdir "${scDIR}"
done
cd dwnld || exit
while [[ "${scAppCount}" -lt "${#scApps[*]}" ]]; do
#echo "App-${scAppCount}: ${scAppsUrl[${scAppCount}]}"
if [[ ! -f "${scApps[${scAppCount}]}" ]]; then
wget --content-disposition "${scAppsUrl[${scAppCount}]}"
fi
((scAppCount++))
done
cd ../apps || exit
for scApp in "${scApps[@]}"; do
tar xvfpz ../dwnld/"${scApp}"
done
cd ..
tar cvfpj nextcloud-apps.tar.bz2 apps
#for scDIR in apps dwnld; do
# rm -rf "${scDIR}"
#done