setupenv: Add tool directories to PATH, be more verbose

No more `bin/tools/hexnet -4t 9000`. Just `hexnet -4t 9000` now.
Soda
BodgeMaster 2022-08-16 13:55:42 +02:00
parent 017c8a61f8
commit bddab2e9f8
1 changed files with 9 additions and 2 deletions

View File

@ -13,9 +13,10 @@
# version 3 along with this program. # version 3 along with this program.
# If not, see https://www.gnu.org/licenses/agpl-3.0.en.html # If not, see https://www.gnu.org/licenses/agpl-3.0.en.html
echo -n "Loading shell environment for FOSS-VG development... " echo ">>> Loading shell environment for FOSS-VG development..."
PROJECT_BASE_DIR="$( cd -- "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 ; pwd -P )" PROJECT_BASE_DIR="$( cd -- "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 ; pwd -P )"
echo "Project base directory is $PROJECT_BASE_DIR"
alias clean="pushd \"$PROJECT_BASE_DIR\" >/dev/null 2>&1; scripts/clean.sh; popd >/dev/null 2>&1" alias clean="pushd \"$PROJECT_BASE_DIR\" >/dev/null 2>&1; scripts/clean.sh; popd >/dev/null 2>&1"
alias clean_dependencies="pushd \"$PROJECT_BASE_DIR\" >/dev/null 2>&1; scripts/clean_dependencies.sh; popd >/dev/null 2>&1" alias clean_dependencies="pushd \"$PROJECT_BASE_DIR\" >/dev/null 2>&1; scripts/clean_dependencies.sh; popd >/dev/null 2>&1"
@ -33,15 +34,21 @@ function build {
popd >/dev/null 2>&1 popd >/dev/null 2>&1
} }
echo "Added aliases and functions."
export PATH="$PROJECT_BASE_DIR/bin/tools:$PROJECT_BASE_DIR/scripts/tools:$PATH"
echo "PATH is $PATH"
if [ -z "$LD_LIBRARY_PATH" ]; then if [ -z "$LD_LIBRARY_PATH" ]; then
export LD_LIBRARY_PATH="$PROJECT_BASE_DIR"/bin/lib export LD_LIBRARY_PATH="$PROJECT_BASE_DIR"/bin/lib
else else
export LD_LIBRARY_PATH="$PROJECT_BASE_DIR"/bin/lib:"$LD_LIBRARY_PATH" export LD_LIBRARY_PATH="$PROJECT_BASE_DIR"/bin/lib:"$LD_LIBRARY_PATH"
fi fi
echo "LD_LIBRARY_PATH is $LD_LIBRARY_PATH"
if [ -f "$PROJECT_BASE_DIR/.localenv.bashrc" ]; then if [ -f "$PROJECT_BASE_DIR/.localenv.bashrc" ]; then
source "$PROJECT_BASE_DIR/.localenv.bashrc" source "$PROJECT_BASE_DIR/.localenv.bashrc"
echo "Loaded local environment customizations."
fi fi
echo "done." echo ">>> Done."