sqg: Fix sqg detection of which repo it should use

If the master or current repos are used and someone switches back to
a stable SBo version, sqg will not use the stable version without
deleting the other repo(s) since it simply checks for the .git folder
first. If it is found, it never attempts to switch to the repo set
for sbopkg.

This change adds detection for the "master" and "current" repos and
will ensure sqg uses the proper repo that is set in /etc/sbopkg.conf
or /root/.sbopkg.conf.

Signed-off-by: Willy Sudiarto Raharjo <willysr@sbopkg.org>
This commit is contained in:
Jeremy Hansen 2022-03-15 22:35:26 -06:00 committed by Willy Sudiarto Raharjo
parent e53096c20c
commit e4eede9f7b
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
2 changed files with 4 additions and 2 deletions

View File

@ -27,7 +27,7 @@ sanity_checks () {
fi
# check whether we are using git or rsync
if [ -d $REPO_ROOT/$REPO_NAME/.git ]; then
if [ $REPO_BRANCH == "master" ] || [ $REPO_BRANCH == "current" ]; then
REPO_SUBPATH=$REPO_NAME
else
REPO_SUBPATH=$REPO_NAME/$REPO_BRANCH

View File

@ -1,8 +1,10 @@
SBOPKG NEWS
sbopkg-devel (2022-03-12 03:20 UTC)
sbopkg-devel (2022-03-16 11:56 UTC)
MODIFICATIONS
* Update renames
* sqg: Fix repo detection when people switch from stable to master or vice versa
Patch by Jeremy Hansen (#77)
sbopkg 0.38.2 (2022-03-10 16:29 UTC)
FEATURES