=== modified file 'build' --- build 2017-11-15 00:33:54 +0000 +++ build 2017-11-14 09:47:48 +0000 @@ -1,19 +1,9 @@ #!/bin/zsh -autoload -Uz colors; colors -setopt no_unset warn_create_global extended_glob set -x cd $0:h || exit -# helper that prints out error message and exits -die() { - print -r - "$fg_bold[red]*$reset_color $@" >&2 - exit 1 -} - name=$1 shift -target=$(base64 -w 0 <<<${(j::)${(oq)@}} | tr +/ -_).$name \ - || die "Failed to generate target name" target=${(j::)${(oq)@}}.$name mkdir -p meta || exit $? redo-ifchange meta/$target === modified file 'common.zsh' --- common.zsh 2017-11-15 00:33:54 +0000 +++ common.zsh 2017-11-15 00:20:53 +0000 @@ -26,9 +26,8 @@ decode_args() { typeset -gA vars - local arg decoded - decoded=$(tr <<<${BASE##*/} -_ +/ | base64 -d) - for arg in "${(s::Q)decoded}"; do + local arg + for arg in "${(s::Q)${BASE##*/}}"; do if [[ "$arg" != *=* ]]; then echo >&2 "Malformed argument: ${(qqq)arg}" exit 1 @@ -119,8 +118,7 @@ else run=( redo-ifchange ) fi - target=$(base64 -w 0 <<<${(j::)${(oq)new_vars}} | tr +/ -_).$name \ - || die "Failed to generate target name" + target=${(j::)${(oq)new_vars}}.$name "$run[@]" meta/$target || die "Building $name failed ($target)" if (($#lift)); then