From: Emil Williams Date: Sun, 7 Apr 2024 05:08:03 +0000 (+0000) Subject: fix @{} regexp X-Git-Tag: v20240404~2 X-Git-Url: https://git.xolatile.top/?a=commitdiff_plain;h=85fb72bdcba4c29b8dfb76009c8e69847baeaf29;p=emil-bake.git fix @{} regexp --- diff --git a/shake b/shake index ec609fe..bb7679e 100755 --- a/shake +++ b/shake @@ -79,10 +79,11 @@ if [[ -n $line ]]; then line=${line//@FILENAME/$input_file} line=${line//@SHORT/${input_file%.*}} line=${line//@ARGS/$@} - line=$(echo "$line" | sed 's/\W*@STOP.*//') + line=$(echo "$line" | sed 's/@STOP.*//') echo -e "${BOLD}${GREEN}$0${NORMAL}: ${line#*${MARK}}" - echo=$(echo "$line" | sed 's/@{\(.*\)\([^\\]\)}.*$/\1\2/') + + line=$(echo "$line" | sed -E 's/@\{([^ \}]+?)\}/\1/') command="${line#*${MARK}}" if [[ $run -eq 1 ]]; then echo -e "${BOLD}${GREEN}output${NORMAL}:"