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>
As many package name now uses xx.yy format, it may failed
to detect the correct package name.
Thanks to Chris Abela.
Fix#19.
Signed-off-by: Willy Sudiarto Raharjo <willysr@sbopkg.org>
A cluster of changes related to creating symlinks in the
/etc/{renames,repos}.d directories that point to the corresponding
README in sbopkg's docdir and then generally updating most
build-related files and getting it all documented.
* 50-default: renamed to 50-default.renames
* NEWS: note symlink docs and rename issues
* README-renames: update to reflect new default filename and the fact
that the files must end in '.renames'.
* sbopkg.conf.5, sbopkg.8: update to reflect the new renames stuff
(and the earlier repo file/dir-related changes I forgot to document
there).
* sbopkg: get_new_name(), get_old_name(): have grep only look through
*.renames files and not, say, symlinks to READMEs.
* doinst.sh: bring into alignment with the current SBo template.
* tools/sbopkg.SlackBuild: make links from README-repos and
README-renames to READMEs in the corresponding /etc/sbopkg/*.d
directories.
* tools/slack-desc: bring into alignment with the current SBo
template.
* tools/sspm: update address, add printe() and use it.