Merge pull request #28 from shamilbi/master

fix: egrep and fgrep commands have been deprecated since 2007
This commit is contained in:
Piter Punk 2023-04-05 18:02:01 -03:00 committed by GitHub
commit b2b7edb10a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.tmp

View file

@ -639,7 +639,7 @@ function mkregex_blacklist() {
s,^, , s,^, ,
s,$, , s,$, ,
s,^ (extra|pasture|patches|slackware(|64)|testing)/ $,^\1 , s,^ (extra|pasture|patches|slackware(|64)|testing)/ $,^\1 ,
s,^ ([^/]+)/ $, \\\.\\\/$PKGMAIN\\\/\1\$, s,^ ([^/]+)/ $, \\\./$PKGMAIN/\1\$,
" ${CONF}/blacklist > ${TMPDIR}/blacklist.tmp " ${CONF}/blacklist > ${TMPDIR}/blacklist.tmp
# Filter server and local package lists through blacklist # Filter server and local package lists through blacklist
@ -1276,7 +1276,7 @@ function sanity_check() {
[ "$SPINNING" = "off" ] || spinning ${TMPDIR}/waiting & [ "$SPINNING" = "off" ] || spinning ${TMPDIR}/waiting &
for i in $(ls -1 $ROOT/var/log/packages/ | \ for i in $(ls -1 $ROOT/var/log/packages/ | \
egrep -- "^.*-(${ARCH}|fw|noarch)-[^-]+-upgraded"); do grep -E -- "^.*-(${ARCH}|fw|noarch)-[^-]+-upgraded"); do
REVNAME=$(echo ${i} | awk -F'-upgraded' '{ print $1 }') REVNAME=$(echo ${i} | awk -F'-upgraded' '{ print $1 }')
mv $ROOT/var/log/packages/${i} $ROOT/var/log/packages/${REVNAME} mv $ROOT/var/log/packages/${i} $ROOT/var/log/packages/${REVNAME}
mv $ROOT/var/log/scripts/${i} $ROOT/var/log/scripts/${REVNAME} mv $ROOT/var/log/scripts/${i} $ROOT/var/log/scripts/${REVNAME}

View file

@ -222,7 +222,7 @@ while [ -n "$1" ] ; do
CMD=$1 CMD=$1
shift shift
if [ -n "$1" ]; then if [ -n "$1" ]; then
if echo $1 | egrep -q "^\.{0,2}/" ; then if echo $1 | grep -Eq "^\.{0,2}/" ; then
if [ -e $1 ]; then if [ -e $1 ]; then
INPUTLIST=$(cat $1 | tr "\n" " ") INPUTLIST=$(cat $1 | tr "\n" " ")
else else