diff --git a/build/moon.zsh b/build/moon.zsh index eccc200..2bb7e4d 100644 --- a/build/moon.zsh +++ b/build/moon.zsh @@ -10,11 +10,11 @@ function moon.build { if [[ -n "${sources[$target]}" ]]; then S="${sources[$target]}" - else + elif [[ -e "${target%.lua}.moon" ]]; then S="${target%.lua}.moon" fi - if [[ -e "${S%% *}" ]]; then + if [[ -n "${S}" ]]; then write " ${S}" write "\t@echo '$(MOON "${target}")'" # write "\t@echo '$(SED "${basename}")'" diff --git a/build/script.zsh b/build/script.zsh index 52da3ee..f2daa47 100644 --- a/build/script.zsh +++ b/build/script.zsh @@ -4,13 +4,13 @@ function script.build { if [[ -n "${sources[$target]}" ]]; then S="${sources[$target]}" - else + elif [[ -e "${target}.in" ]]; then S="${target}.in" fi write -n "${target}:" - if [[ -e "${S%% *}" ]]; then + if [[ -n "${S}" ]]; then write " $S" write "\t@echo '$(SED "${target}")'" write -n "\t${Q}sed -e '"