1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gogs_ynh.git synced 2024-09-03 20:36:23 +02:00

Avoid major disaster caused by an empty variable during update

This commit is contained in:
mbugeia 2016-10-11 22:44:17 +02:00
parent 081886c333
commit 13ecdbf066

View file

@ -38,7 +38,7 @@ then
# move repositories to new dir
sudo mkdir -p "$REPO_PATH"
old_repo_path=$(ynh_app_setting_get "$app" repopath)
sudo mv "$old_repo_path"/* "$REPO_PATH"
sudo mv "${old_repo_path:-/home/yunohost.app/gogs}"/* "$REPO_PATH"
# cleanup old dir and conf
sudo unlink /opt/gogs
sudo rm -rf /etc/gogs /opt/gogs_src