feat blueprint.sh
: add more commands to case list
This commit is contained in:
parent
997778dcb5
commit
550b01a1c2
2 changed files with 12 additions and 38 deletions
43
blueprint.sh
43
blueprint.sh
|
@ -332,8 +332,12 @@ case "${2}" in
|
||||||
-add|-install|-i) source ./scripts/commands/extensions/install.sh ;;
|
-add|-install|-i) source ./scripts/commands/extensions/install.sh ;;
|
||||||
-remove|-r) source ./scripts/commands/extensions/remove.sh ;;
|
-remove|-r) source ./scripts/commands/extensions/remove.sh ;;
|
||||||
-init|-I) source ./scripts/commands/developer/init.sh ;;
|
-init|-I) source ./scripts/commands/developer/init.sh ;;
|
||||||
|
-info|-f) source ./scripts/commands/misc/info.sh ;;
|
||||||
|
-debug) source ./scripts/commands/misc/debug.sh ;;
|
||||||
|
-rerun-install) source ./scripts/commands/advanced/rerun-install.sh ;;
|
||||||
|
-upgrade) source ./scripts/commands/advanced/upgrade.sh ;;
|
||||||
|
|
||||||
*) source ./scripts/commands/misc/help.sh ;;
|
*) source ./scripts/commands/unknown.sh ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
shift 2
|
shift 2
|
||||||
|
@ -403,13 +407,6 @@ if [[ ( $2 == "-v" ) || ( $2 == "-version" ) ]]; then VCMD="y"
|
||||||
VersionCommand
|
VersionCommand
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# -debug
|
|
||||||
if [[ $2 == "-debug" ]]; then VCMD="y"
|
|
||||||
source ./scripts/commands/misc/debug.sh
|
|
||||||
DebugCommand "$3"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# -build
|
# -build
|
||||||
if [[ ( $2 == "-build" || $2 == "-b" ) ]]; then VCMD="y"
|
if [[ ( $2 == "-build" || $2 == "-b" ) ]]; then VCMD="y"
|
||||||
source ./scripts/commands/developer/build.sh
|
source ./scripts/commands/developer/build.sh
|
||||||
|
@ -511,34 +508,4 @@ if [[ ( $2 == "-wipe" || $2 == "-w" ) ]]; then VCMD="y"
|
||||||
2>> "$BLUEPRINT__DEBUG"
|
2>> "$BLUEPRINT__DEBUG"
|
||||||
|
|
||||||
PRINT SUCCESS "Development folder has been cleared."
|
PRINT SUCCESS "Development folder has been cleared."
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# -info
|
|
||||||
if [[ ( $2 == "-info" || $2 == "-f" ) ]]; then VCMD="y"
|
|
||||||
source ./scripts/commands/misc/info.sh
|
|
||||||
Command
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# -rerun-install
|
|
||||||
if [[ $2 == "-rerun-install" ]]; then VCMD="y"
|
|
||||||
source ./scripts/commands/advanced/rerun-install.sh
|
|
||||||
Command
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# -upgrade
|
|
||||||
if [[ $2 == "-upgrade" ]]; then VCMD="y"
|
|
||||||
source ./scripts/commands/advanced/upgrade.sh
|
|
||||||
UpgradeCommand "$1" "$2"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# When the users attempts to run an invalid command.
|
|
||||||
if [[ ${VCMD} != "y" && $1 == "-bash" ]]; then
|
|
||||||
# This is logged as a "fatal" error since it's something that is making Blueprint run unsuccessfully.
|
|
||||||
PRINT FATAL "'$2' is not a valid command or argument. Use argument '-help' for a list of commands."
|
|
||||||
exit 2
|
|
||||||
fi
|
fi
|
7
scripts/commands/unknown.sh
Normal file
7
scripts/commands/unknown.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
Command() {
|
||||||
|
# This is logged as a "fatal" error since it's something that is making Blueprint run unsuccessfully.
|
||||||
|
PRINT FATAL "'$1' is not a valid command or argument. Use argument '-help' for a list of commands."
|
||||||
|
exit 2
|
||||||
|
}
|
Loading…
Reference in a new issue