Fix init_module and default module

This commit is contained in:
Antonin Décimo
2015-06-24 01:20:45 +02:00
parent 2dc8fd07d5
commit 2ce23ea032

View File

@@ -323,11 +323,14 @@ init_module () {
local module="$2" local module="$2"
read_config "$module" read_config "$module"
module=${module^^} module=${module^^}
if (( $opt == 1 )); then if (( $opt == 0 )); then
if [[ ${!module} == false ]]; then exit_module "execute"; fi if [[ ${!module} == false ]]; then
fi read_config "default"
if compare_version "$LOVE_VERSION" ">" "$VERSION"; then fi
echo "LÖVE $LOVE_VERSION is out ! Your project uses LÖVE ${VERSION}." else
if [[ ${!module} == false ]]; then
exit_module "execute"
fi
fi fi
gen_version $VERSION gen_version $VERSION
unset VERSION unset VERSION
@@ -426,13 +429,17 @@ fi
( (
(init_module "LÖVE" "love" "L") init_module "LÖVE" "love" "L"
if [[ $? -eq 0 || $DEFAULT_MODULE == true ]]; then create_love_file 9
init_module "LÖVE" "default" exit_module
create_love_file 9
exit_module
fi
) )
if [[ $? -ne 0 && $DEFAULT_MODULE == true ]]; then
(
init_module "LÖVE" "default"
create_love_file 9
exit_module
)
fi
exit 0 exit 0