Shebangs added to compiled moonscript files.
- If an alternate installation directory is specified by hand, however, no shebang will be added, because that file is likely to be used as a module or some other sort of loadable code. - This is mostly a temporary workaround, because we need to be more specific about what files need to receive a shebang and what other files do not. auto[$target] could do the distinction, though, but additional variables could be preferable.
This commit is contained in:
parent
b449ce07a3
commit
2024b1e1f9
@ -17,14 +17,13 @@ function moon.build {
|
|||||||
if [[ -n "${S}" ]]; then
|
if [[ -n "${S}" ]]; then
|
||||||
write " ${S}"
|
write " ${S}"
|
||||||
write "\t@echo '$(MOON "${target}")'"
|
write "\t@echo '$(MOON "${target}")'"
|
||||||
# write "\t@echo '$(SED "${basename}")'"
|
if [[ -z "${install[$target]}" ]]; then
|
||||||
# write -n "\t${Q}sed -e '"
|
write "\t${Q}echo '#!/usr/bin/env lua' > '${target}'"
|
||||||
# write -n "s&@LIBDIR@&\$(LIBDIR)&;"
|
write "\t${Q}moonc -p $S >> '${target}'"
|
||||||
# write -n "s&@BINDIR@&\$(BINDIR)&;"
|
else
|
||||||
# write -n "s&@SHAREDIR@&\$(SHAREDIR)&;"
|
|
||||||
# write "' '${basename}.in' > '${basename}'"
|
|
||||||
write "\t${Q}moonc -p $S > '${target}'"
|
write "\t${Q}moonc -p $S > '${target}'"
|
||||||
# write "\t${Q}chmod +x '${basename}'"
|
write "\t${Q}chmod +x '${basename}'"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
write "\n"
|
write "\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user