PATCH: Revert to Previous Install, Setup and Update Scripts

This commit is contained in:
Mitchell Krog 2017-09-20 12:56:22 +02:00
parent 6811adf45e
commit 5956814094
No known key found for this signature in database
GPG key ID: 2BB9A077C8DD6994
4 changed files with 68 additions and 20 deletions

View file

@ -186,9 +186,8 @@ find_line() {
local file=$1 find_str=$2 first_last=$3
case "$first_last" in
# ignore file #comments
first) grep -nE "^[ ]+$find_str" $file | head -n1 | awk -F: '{print $1}'
last) grep -nE "^[ ]+$find_str" $file | tail -n1 | awk -F: '{print $1}'
first) awk "/$find_str/{ print NR; exit }" $file;;
last) awk "/$find_str/{ print NR }" $file | tail -n1;;
esac
}