mirror of
https://github.com/sbopkg/sbopkg
synced 2025-01-28 19:58:22 +01:00
add a regex fix to remove some double quotes; also split the regex's out into separate lines for easier reading; thanks to Mauro and slakmagik.
This commit is contained in:
parent
c2c7cb1442
commit
26fc3f6ebe
1 changed files with 24 additions and 9 deletions
|
@ -584,10 +584,18 @@ check_for_updates() {
|
||||||
|
|
||||||
# Extract the new package version
|
# Extract the new package version
|
||||||
if [[ ! -z $NEWSB ]]; then
|
if [[ ! -z $NEWSB ]]; then
|
||||||
NEWARCH=$(egrep -m1 "^ARCH" $NEWSB | sed -e \
|
NEWARCH=$(egrep -m1 "^ARCH" $NEWSB | sed '
|
||||||
's/[ #}\t].*$//;s/^.*[=-]//;s/\"//g')
|
s/\([^\t #]*\)[\t #].*/\1/
|
||||||
NEWBUILD=$(egrep -m1 "^BUILD" $NEWSB | sed -e \
|
s/[^=]*=//
|
||||||
's/^.*[=-]//;s/\"//;s/[ #}\t].*$//g;s/\"//g')
|
s/"//g
|
||||||
|
s/\${[^-]*-\(.*\)}/\1/
|
||||||
|
s/\$.*/unknown/
|
||||||
|
')
|
||||||
|
NEWBUILD=$(egrep -m1 "^BUILD" $NEWSB | sed '
|
||||||
|
s/^.*[=-]//
|
||||||
|
s/"//g
|
||||||
|
s/[ #}\t].*$//g
|
||||||
|
')
|
||||||
|
|
||||||
# Step 1 - find the version expression
|
# Step 1 - find the version expression
|
||||||
# This looks for the last instance of $OUTPUT.
|
# This looks for the last instance of $OUTPUT.
|
||||||
|
@ -985,11 +993,18 @@ info_item() {
|
||||||
SHORTPATH=$REPO_DIR/$CATEGORY/$APP
|
SHORTPATH=$REPO_DIR/$CATEGORY/$APP
|
||||||
CURVERSION=$(grep VERSION $SHORTPATH/$APP.info |
|
CURVERSION=$(grep VERSION $SHORTPATH/$APP.info |
|
||||||
cut -d= -f2 | sed s/\"//g)
|
cut -d= -f2 | sed s/\"//g)
|
||||||
CURARCH=$(egrep -m1 "^ARCH" $SHORTPATH/$APP.SlackBuild |
|
CURARCH=$(egrep -m1 "^ARCH" $SHORTPATH/$APP.SlackBuild | sed '
|
||||||
sed -e "s/\([^\t #]*\)[\t #].*/\1/;s/[^=]*=//;s/\${[^-]*-\(.*\)}/\1/;\
|
s/\([^\t #]*\)[\t #].*/\1/
|
||||||
s/\$.*/unknown/")
|
s/[^=]*=//
|
||||||
CURBUILD=$(egrep -m1 "^BUILD" $SHORTPATH/$APP.SlackBuild |
|
s/"//g
|
||||||
sed -e 's/^.*[=-]//;s/\"//;s/[ #}\t].*$//g;s/\"//g')
|
s/\${[^-]*-\(.*\)}/\1/
|
||||||
|
s/\$.*/unknown/
|
||||||
|
')
|
||||||
|
CURBUILD=$(egrep -m1 "^BUILD" $SHORTPATH/$APP.SlackBuild | sed '
|
||||||
|
s/^.*[=-]//
|
||||||
|
s/"//g
|
||||||
|
s/[ #}\t].*$//g
|
||||||
|
')
|
||||||
while :; do
|
while :; do
|
||||||
INSTALLEDPACKAGE=$(ls /var/log/packages |
|
INSTALLEDPACKAGE=$(ls /var/log/packages |
|
||||||
egrep "^($APP|$OLDPKG)-[^-]*-[^-]*-[^-]*\$")
|
egrep "^($APP|$OLDPKG)-[^-]*-[^-]*-[^-]*\$")
|
||||||
|
|
Loading…
Add table
Reference in a new issue