mirror of
https://github.com/YunoHost-Apps/nodebb_ynh.git
synced 2024-09-03 19:46:29 +02:00
Update _common.sh
This commit is contained in:
parent
83a709e137
commit
c36439667d
1 changed files with 16 additions and 0 deletions
|
@ -96,6 +96,22 @@ ynh_remove_systemd_config () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SETUP_SOURCE () { # Télécharge la source, décompresse et copie dans $final_path
|
||||||
|
src_url=$(cat ../conf/app.src | grep SOURCE_URL | cut -d'>' -f2)
|
||||||
|
src_checksum=$(cat ../conf/app.src | grep SOURCE_SUM | cut -d= -f2)
|
||||||
|
# Download sources from the upstream
|
||||||
|
wget -nv -O source.tar.gz $src_url
|
||||||
|
# Vérifie la somme de contrôle de la source téléchargée.
|
||||||
|
echo "$src_checksum source.tar.gz" | md5sum -c --status || ynh_die "Corrupt source"
|
||||||
|
# Extract source into the app dir
|
||||||
|
sudo mkdir -p $final_path
|
||||||
|
sudo tar -x -f source.tar.gz -C $final_path --strip-components 1
|
||||||
|
# Copie les fichiers additionnels ou modifiés.
|
||||||
|
if test -e "../sources/ajouts"; then
|
||||||
|
sudo cp -a ../sources/ajouts/. "$final_path"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue