Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
Jack L. Frost 2018-07-27 23:49:51 +03:00
parent ccad66749c
commit 4d9c558264
1 changed files with 5 additions and 4 deletions

View File

@ -127,12 +127,13 @@ handle_target() {
fi
while (( $# )); do
cmd=$1 regex=$2
cmd_str=$1 regex=$2
cmd=()
if [[ $cmd == *'%target%'* ]]; then
cmd=( ${cmd//%target%/$target} )
if [[ $cmd_str == *'%target%'* ]]; then
cmd=( ${cmd_str//%target%/$target} )
else
cmd+=( "$target" )
cmd=( $cmd_str "$target" )
fi
if [[ "$target_left" =~ $regex ]]; then