From 7b4d0eb53baac338408d165a0fbabf57f43d92c2 Mon Sep 17 00:00:00 2001 From: Martin Blazik Date: Wed, 16 Sep 2020 10:42:02 +0200 Subject: [PATCH] Refactor bashrc Not check sourcing --- bashrc | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/bashrc b/bashrc index 05e2f83..34fa70c 100644 --- a/bashrc +++ b/bashrc @@ -1,14 +1,11 @@ -if [[ $0 != $BASH_SOURCE ]]; then - WORKSPACE_PATH=$(realpath $BASH_SOURCE) - export WORKSPACE=$(dirname $WORKSPACE_PATH) +echo "Loading Linux Workspace Project bashrc" - for rc_file in $WORKSPACE/rc/*.rc; do - source $rc_file - done +WORKSPACE_PATH=$(realpath $BASH_SOURCE) +export WORKSPACE=$(dirname $WORKSPACE_PATH) +for rc_file in $WORKSPACE/rc/*.rc; do + source $rc_file +done - PATH=$($WORKSPACE/bin/path-uniq.py $WORKSPACE/bin) -else - echo "not sourced" -fi +PATH=$($WORKSPACE/bin/path-uniq.py $WORKSPACE/bin)