Make shell a source script instead

This commit is contained in:
Fierelier 2023-01-15 21:54:54 +01:00
parent 787aff82b3
commit bea7576321
1 changed files with 1 additions and 9 deletions

10
shell
View File

@ -1,15 +1,7 @@
#!/bin/bash
set -e
SCRIPT_DIR="$(dirname "$(realpath -s "$BASH_SOURCE")")"
cd "$SCRIPT_DIR"
ARGS="$@"
export PATH="$SCRIPT_DIR/path:$PATH"
export PS1="\$? $PS1"
source ./env
if [ "$ARGS" == "" ]; then
echo "-- project shell --"
exec bash
else
exec bash -c "$ARGS"
fi
source ./env