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:
parent
9a2ab31af0
commit
2004146b78
1 changed files with 8 additions and 2 deletions
|
@ -111,7 +111,10 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]; then
|
||||||
if [ ! `git rev-parse --is-inside-work-tree &> /dev/null` ]; then
|
if [ ! `git rev-parse --is-inside-work-tree &> /dev/null` ]; then
|
||||||
# If current install is not a Git repo then init one
|
# If current install is not a Git repo then init one
|
||||||
git init --quiet
|
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 fetch origin --quiet
|
||||||
git checkout -b stable --track origin/stable --force --quiet
|
git checkout -b stable --track origin/stable --force --quiet
|
||||||
fi
|
fi
|
||||||
|
@ -125,7 +128,10 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]; then
|
||||||
if [ ! `git rev-parse --is-inside-work-tree &> /dev/null` ]; then
|
if [ ! `git rev-parse --is-inside-work-tree &> /dev/null` ]; then
|
||||||
# If current install is not a Git repo then init one
|
# If current install is not a Git repo then init one
|
||||||
git init --quiet
|
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 fetch origin --quiet
|
||||||
git checkout -b stable --track origin/stable --force --quiet
|
git checkout -b stable --track origin/stable --force --quiet
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue