Merge pull request #996 from mempool/wiz/fix-upgrade-script-for-simon

Tweak upgrade script to search for remote origin branches
This commit is contained in:
softsimon 2021-12-09 14:29:28 +04:00 committed by GitHub
commit 271726bf58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,13 +21,15 @@ update_repo()
cd "$HOME/${site}" || exit 1
git fetch origin || exit 1
for remote in mempool MiguelMedeiros knorrium;do
for remote in origin knorrium hunicus;do
git remote add "${remote}" "https://github.com/${remote}/mempool" >/dev/null 2>&1
git fetch "${remote}" || exit 1
done
if [ $(git tag -l "${REF}") ];then
git reset --hard "tags/${REF}" || exit 1
elif [ $(git branch -r -l "origin/${REF}") ];then
git reset --hard "origin/${REF}" || exit 1
else
git reset --hard "${REF}" || exit 1
fi