1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jupyterlab_ynh.git synced 2024-09-03 19:26:35 +02:00

fix upgrade

This commit is contained in:
Pierre Bourré 2019-01-21 23:48:18 +01:00
parent 1f4ed86570
commit 923fcf98fb

View file

@ -134,21 +134,26 @@ setup_source() {
if [ "$src_filename" = "" ] ; then if [ "$src_filename" = "" ] ; then
src_filename="${src_id}.${src_format}" src_filename="${src_id}.${src_format}"
fi fi
local local_src="/opt/yunohost-apps-src/${YNH_APP_ID}/${src_filename}"
if test -e "$local_src" if ! test -e "$final_path"
then # Use the local source file if it is present then
cp $local_src $src_filename
else # If not, download the source local local_src="/opt/yunohost-apps-src/${YNH_APP_ID}/${src_filename}"
local out=`wget -nv -O $src_filename $src_url 2>&1` || ynh_print_err $out
if test -e "$local_src"
then # Use the local source file if it is present
cp $local_src $src_filename
else # If not, download the source
local out=`wget -nv -O $src_filename $src_url 2>&1` || ynh_print_err $out
fi
# Check the control sum
echo "${src_sum} ${src_filename}" | ${src_sumprg} -c --status \
|| ynh_die "Corrupt source"
bash $src_filename -b -p $final_path
fi fi
# Check the control sum
echo "${src_sum} ${src_filename}" | ${src_sumprg} -c --status \
|| ynh_die "Corrupt source"
bash $src_filename -b -p $final_path
export "PATH=$final_path/bin/:$PATH" export "PATH=$final_path/bin/:$PATH"
if [ "$src_id" = "arm" ] if [ "$src_id" = "arm" ]