Skip to content
Snippets Groups Projects
Commit 222c8217 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

shellcheck fixes

parent 396555d7
No related branches found
No related tags found
No related merge requests found
Pipeline #283550 passed
......@@ -6,17 +6,13 @@
set -euo pipefail
export SHELLOPTS
BIN_PATH="`dirname \"$0\"`" # relative
BIN_PATH="`( cd \"$BIN_PATH\" && pwd )`" # absolutized and normalized
install_app () {
# Set "/" as default path
path=${3:-/}
destDir=${2:-.}
echo $destDir
echo "$destDir"
# Remove trailing slash from path
path=${path%/}
......@@ -26,8 +22,8 @@ install_app () {
echo "Installing app: '$packageName' in directory '$destDir' with path prefix '$path'...";
# Do a basic check if a path was entered
if [[ $destDir != "." && $destDir != ".." ]]; then
mkdir -p $destDir && cd $_ || exit 2;
if [[ "$destDir" != "." && "$destDir" != ".." ]]; then
mkdir -p "$destDir" && cd "$_" || exit 2;
fi
npm init -y || exit 2;
......@@ -60,7 +56,7 @@ case $1 in
install_app "${@:2}"
;;
"update-app")
update_app $2
update_app "$2"
;;
*)
echo "Unknown command: $1";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment