Skip to content

Commit

Permalink
*.sh: Handle unset environment variables and adjust commandline handling
Browse files Browse the repository at this point in the history
  • Loading branch information
centic9 committed Mar 26, 2020
1 parent 2f84947 commit babeac4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -eu
#!/bin/bash

set -e
set -eu

SOURCE_LOCATION="`dirname \"$0\"`"
SOURCE_LOCATION="`( cd \"${SOURCE_LOCATION}\" && pwd )`"
Expand All @@ -24,7 +24,7 @@ do
fi
done

if [ "${BUILD_EXTRAS}" == "1" ]; then
if [ "${BUILD_EXTRAS:-0}" == "1" ]; then
cd ${SOURCE_LOCATION}
echo "------building example------"
mkdir -p example-build
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

set -e
set -eu

export DO_INSTALL=1

Expand Down
11 changes: 7 additions & 4 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
#!/bin/sh

set -e
set -eu

SOURCE_LOCATION="`dirname \"$0\"`"
SOURCE_LOCATION="`( cd \"${SOURCE_LOCATION}\" && pwd )`"

cd ${SOURCE_LOCATION}

application=openambit
if test -n "$1"; then
application=$1
shift

if [ $# -gt 0 ];then
echo running $1
application=$1
shift
fi

case "$application" in
openambit) builddir=${application}-build;;
ambitconsole) builddir=example-build;;
Expand Down

0 comments on commit babeac4

Please sign in to comment.