From 2359cd2a404e3dfed40d5c714b9c58acfbbaddc3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 6 Jul 2021 11:59:22 +0200 Subject: Run interactive shell from environment script if no bbot specified --- etc/environments/default | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'etc/environments/default') 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 -- cgit v1.1