aboutsummaryrefslogtreecommitdiff
path: root/etc/environments
diff options
context:
space:
mode:
Diffstat (limited to 'etc/environments')
-rwxr-xr-xetc/environments/default10
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/environments/default b/etc/environments/default
index 25646e6..c7c7953 100755
--- a/etc/environments/default
+++ b/etc/environments/default
@@ -13,7 +13,7 @@ c=gcc
cxx=g++
# $1 - target
-# $2 - bbot executable
+# $2 - bbot executable (if absent, then run $SHELL)
# $3+ - bbot options
set -e # Exit on errors.
@@ -35,4 +35,10 @@ case "$1" in
esac
shift
-exec "$@" cc config.c="$c $mode" config.cxx="$cxx $mode"
+if test $# -ne 0; then
+ exec "$@" cc config.c="$c $mode" config.cxx="$cxx $mode"
+else
+ echo "config.c=$c $mode" 1>&2
+ echo "config.cxx=$cxx $mode" 1>&2
+ exec $SHELL -i
+fi