1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/friendica_ynh.git synced 2024-09-03 18:36:14 +02:00

Fix adding remote during upgrade

This commit is contained in:
tituspijean 2022-09-26 23:50:00 +02:00 committed by GitHub
parent 9a2ab31af0
commit 2004146b78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,7 +111,10 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]; then
if [ ! `git rev-parse --is-inside-work-tree &> /dev/null` ]; then
# If current install is not a Git repo then init one
git init --quiet
git remote add origin $repo_url
if ! git config remote.origin.url > /dev/null; then
# If remote does not exist, add it
git remote add origin $repo_url
fi
git fetch origin --quiet
git checkout -b stable --track origin/stable --force --quiet
fi
@ -125,7 +128,10 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]; then
if [ ! `git rev-parse --is-inside-work-tree &> /dev/null` ]; then
# If current install is not a Git repo then init one
git init --quiet
git remote add origin $addons_repo_url
if ! git config remote.origin.url > /dev/null; then
# If remote does not exist, add it
git remote add origin $addons_repo_url
fi
git fetch origin --quiet
git checkout -b stable --track origin/stable --force --quiet
fi