1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/agora_ynh.git synced 2024-09-03 18:06:21 +02:00

Create _common

This commit is contained in:
frju365 2017-02-13 22:44:20 +01:00 committed by GitHub
parent 0154e674f7
commit c82b416147

13
scripts/_common Normal file
View file

@ -0,0 +1,13 @@
AGORA_SOURCE_URL="https://www.agora-project.net/?ctrl=offline&action=download"
extract_source() {
local DESTDIR=$1
# retrieve and extract Agora tarball
rc_tarball="${DESTDIR}/agora.zip"
sudo wget -q -O "$rc_tarball" "$AGORA_SOURCE_URL" \
|| ynh_die "Unable to download source tarball"
sudo unzip "$rc_tarball" -C "$DESTDIR" \
|| ynh_die "Unable to extract source tarball"
sudo rm "$rc_tarball"
}