mirror of
https://github.com/TangentFoxy/love-release.git
synced 2025-07-29 03:22:19 +00:00
Modules and functions have return values
Modules can now use return values with the exit_module function. Some return values are predefined, use them by passing special string to the function. Most of the functions also switched from a echo "true" to return 0 scheme, which means that every test involving theses functions was rewritten. No more need for the reset_vars function, as modules are run in subshells, thus providing a new scope level. The case when no modules is specified is better handled, a LÖVE file is created by default.
This commit is contained in:
2
Makefile
2
Makefile
@@ -28,7 +28,7 @@ embedded: clean
|
||||
sed 's/EMBEDDED=false/EMBEDDED=true/' love-release.sh > '$(BUILD_DIR)/love-release.sh'
|
||||
for file in scripts/*.sh; do \
|
||||
module="$$(basename -s '.sh' "$$file")"; \
|
||||
content='(source <(cat <<\EndOfModule'$$'\n'"$$(cat $$file)"$$'\n''EndOfModule'$$'\n''))'$$'\n\n'; \
|
||||
content='(source <(cat <<\EndOfModule'$$'\n'"$$(cat $$file)"$$'\n''EndOfModule'$$'\n''))'$$'\n''default_module'$$'\n\n'; \
|
||||
echo "$$content" >> "$(BUILD_DIR)/tmp"; \
|
||||
done
|
||||
sed -i.bak -e '/include_scripts_here$$/r $(BUILD_DIR)/tmp' '$(BUILD_DIR)/love-release.sh';
|
||||
|
Reference in New Issue
Block a user