1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 21:35:45 +02:00

Get rid of errors by using grep -E

"egrep: warning: egrep is obsolescent; using grep -E"
This commit is contained in:
Khalil Santana 2022-10-05 22:03:20 -03:00
parent 20c469245c
commit b44ed287dd
No known key found for this signature in database
GPG Key ID: 92938423B960D703

View File

@ -31,7 +31,7 @@ help(){
exec "$bees_bin" --help
}
for i in $("$bees_bin" --help 2>&1 | grep "\-\-" | sed -e "s/^[^-]*-/-/" -e "s/,[^-]*--/ --/" -e "s/ [^-]*$//")
for i in $("$bees_bin" --help 2>&1 | grep -E "--" | sed -e "s/^[^-]*-/-/" -e "s/,[^-]*--/ --/" -e "s/ [^-]*$//")
do
TMP_ARGS="$TMP_ARGS $i"
done
@ -71,7 +71,7 @@ done
[ -z "$UUID" ] && help
FILE_CONFIG="$(egrep -l '^[^#]*UUID\s*=\s*"?'"$UUID" "$CONFIG_DIR"/*.conf | head -1)"
FILE_CONFIG="$(grep -E -l '^[^#]*UUID\s*=\s*"?'"$UUID" "$CONFIG_DIR"/*.conf | head -1)"
[ ! -f "$FILE_CONFIG" ] && ERRO "No config for $UUID"
INFO "Find $UUID in $FILE_CONFIG, use as conf"
source "$FILE_CONFIG"