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>
Fixes shellcheck parsing errors by using safer quoting practices with
eval.
Line 217:
for FILE in $SBOPKG_REPOS_D/*.repo; do
^-- SC1009: The mentioned syntax error was in this for loop.
Line 219:
while read LINE; do
^-- SC1073: Couldn't parse this while loop. Fix to allow more checks.
^-- SC1061: Couldn't find 'done' for this 'do'.
Line 221:
eval TMPARRAY=( "$LINE" )
^-- SC1036: '(' is invalid here. Did you forget to escape it?
^-- SC1062: Expected 'done' matching previously mentioned 'do'.
^-- SC1072: Expected 'done'. Fix any mentioned problems and try again.
^-- SC1098: Quote/escape special characters when using eval, e.g. eval "a=(b)".
Line 3054:
for i in ${!MD5SUM[@]}; do
^-- SC1009: The mentioned syntax error was in this for loop.
Line 3056:
while :; do
^-- SC1073: Couldn't parse this while loop. Fix to allow more checks.
^-- SC1061: Couldn't find 'done' for this 'do'.
Line 3065:
eval SRCNAME=( $(
^-- SC1036: '(' is invalid here. Did you forget to escape it?
^-- SC1062: Expected 'done' matching previously mentioned 'do'.
^-- SC1072: Expected 'done'. Fix any mentioned problems and try again.
^-- SC1098: Quote/escape special characters when using eval, e.g. eval "a=(b)".
Signed-off-by: Willy Sudiarto Raharjo <willysr@sbopkg.org>
The loop index $i was not protected with curly braces in eval statement
of variable LEFT. When i=10 that statement was not evaluated as $10, but
as $1 concatenated with the digit 0.
Corrected description of outputs of updates_compare_versions().
Fixed#41.
Signed-off-by: Willy Sudiarto Raharjo <willysr@sbopkg.org>
During package creation, most SlackBuilds copy the .SlackBuild file to
/usr/doc/$PKG/. Previously, sbopkg would cause the "original"
SlackBuild instead of the "local" SlackBuild with user edits to be
copied to the documentation directory. Now, sbopkg backs up the
original SlackBuild to $PKGNAME.SlackBuild.original before building the
package.
Old behavior:
1. Original (upstream) SlackBuild is named $PKGNAME.SlackBuild.
2. User optionally defines custom SlackBuild in
$PKGNAME.SlackBuild.sbopkg.
3. sbopkg asks user to use Original or Local SlackBuild, and copies
$PKGNAME.SlackBuild or $PKGNAME.SlackBuild.sbopkg to
$PKGNAME.SlackBuild.build, respectively.
4. sbopkg builds package (which includes copying SlackBuild to
/usr/doc/).
5. sbopkg removes *.build files.
New behavior:
1. Original (upstream) SlackBuild is named $PKGNAME.SlackBuild.
2. User optionally defines custom SlackBuild in
$PKGNAME.SlackBuild.sbopkg.
3. sbopkg asks user to use Original or Local SlackBuild, and copies
$PKGNAME.SlackBuild or $PKGNAME.SlackBuild.sbopkg to
$PKGNAME.SlackBuild.build, respectively.
4. sbopkg backs up original SlackBuild by moving $PKGNAME.SlackBuild
to $PKGNAME.SlackBuild.original.
5. sbopkg copies $PKGNAME.SlackBuild.build to $PKGNAME.SlackBuild.
6. sbopkg builds package (which includes copying SlackBuild to
/usr/doc/).
7. sbopkg restores original SlackBuild by moving
$PKGNAME.SlackBuild.original to $PKGNAME.SlackBuild.
8. sbopkg removes *.build files.
Signed-off-by: Willy Sudiarto Raharjo <willysr@sbopkg.org>