build-example: fix shellcheck errors

parent 5cf2cfeb
#!/usr/bin/env bash
# Make sure the current directory is the location of this script to simplify matters
cd "$(dirname "$(readlink -f "$0")")";
cd "$(dirname "$(readlink -f "$0")")" || { echo "Error: Failed to cd to script directory" >&2; exit 1; };
################
### Settings ###
################
......@@ -23,11 +23,13 @@ build_output_folder="./dist";
# Check out the lantern git submodule if needed
if [ ! -f "${lantern_path}/lantern.sh" ]; then git submodule update --init "${lantern_path}"; fi
#shellcheck disable=SC1090
source "${lantern_path}/lantern.sh";
if [[ "$#" -lt 1 ]]; then
echo -e "${FBLE}${project_name}${RS} build script";
echo -e " by Starbeamrainbowlabs";
# shellcheck disable=SC2154
echo -e "${LC}Powered by the lantern build engine, v${version}${RS}";
echo -e "";
echo -e "${CSECTION}Usage${RS}";
......@@ -138,7 +140,7 @@ task_sprites() {
if [ ! -f "./tools/SpritePacker/SpritePacker-CLI/bin/Debug/SpritePackerCLI.exe" ]; then
task_begin "Building SpritePacker";
cd tools/SpritePacker;
cd tools/SpritePacker || { echo "Error: Failed to cd into tools/SpritePacker"; echo 1; };
msbuild; exit_code=$?;
task_end $exit_code;
......@@ -157,4 +159,4 @@ task_sprites() {
###############################################################################
tasks_run $@;
tasks_run "$@";
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment