replace awk with rg

This commit is contained in:
Tobias Powalowski 2024-07-21 12:08:38 +02:00
parent 1c3a64bd59
commit 688fbb1810
2 changed files with 3 additions and 3 deletions

View file

@ -21,7 +21,7 @@ _parameters() {
case ${1} in case ${1} in
-cc|--cc) _CLEANUP_CONTAINER="1" ;; -cc|--cc) _CLEANUP_CONTAINER="1" ;;
-cp|--cp) _CLEANUP_CACHE="1" ;; -cp|--cp) _CLEANUP_CACHE="1" ;;
-install-source=*|--install-source=*) _INSTALL_SOURCE="$(echo "${1}" | awk -F= '{print $2;}')" ;; -install-source=*|--install-source=*) _INSTALL_SOURCE="$(echo "${1}" | rg -o '=(.*)' -r '$1')" ;;
esac esac
shift shift
done done

View file

@ -27,8 +27,8 @@ _parameters() {
case ${1} in case ${1} in
-g|--g) export _GENERATE="1" ;; -g|--g) export _GENERATE="1" ;;
-s|--s) _SAVE_INIT="1" ;; -s|--s) _SAVE_INIT="1" ;;
-c=*|--c=*) _CONFIG="$(echo "${1}" | awk -F= '{print $2;}')" ;; -c=*|--c=*) _CONFIG="$(echo "${1}" | rg -o '=(.*)' -r '$1')" ;;
-i=*|--i=*) _IMAGENAME="$(echo "${1}" | awk -F= '{print $2;}')" ;; -i=*|--i=*) _IMAGENAME="$(echo "${1}" | rg -o '=(.*)' -r '$1')" ;;
-h|--h|?) _usage ;; -h|--h|?) _usage ;;
*) _usage ;; *) _usage ;;
esac esac