diff --git a/set_env.sh b/set_env.sh index 7e384ba..bb31617 100644 --- a/set_env.sh +++ b/set_env.sh @@ -1,12 +1,13 @@ #!/bin/bash +export CPATH=$PWD/include_ytest/include:$CPATH +export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH + if [ "$#" -le 0 ] ; then echo "if need permanent config" echo "Usage: $0 file_name" >&2 echo "for example: $0 ~/.bashrc" >&2 echo "or an other bash profile, here it is \"~/.bashrc\" for example" - export CPATH=$PWD/include_ytest/include:$CPATH - export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH else echo "export CPATH=$PWD/include_ytest/include:\$CPATH" >> $1 echo "export LD_LIBRARY_PATH=$PWD:\$LD_LIBRARY_PATH" >> $1 diff --git a/unset_env.sh b/unset_env.sh index a67a61e..73c3de8 100644 --- a/unset_env.sh +++ b/unset_env.sh @@ -1,11 +1,13 @@ #!/bin/bash + +LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | sed "s@$PWD:@@g") +CPATH=$(echo $CPATH | sed "s@$PWD/include_ytest/include:@@g") + if [ "$#" -le 0 ] ; then - LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | sed "s@$PWD:@@g") - CPATH=$(echo $CPATH | sed "s@$PWD/include_ytest/include:@@g") echo "If need permanent unset env " echo "Usage: $0 file_name" echo "for example: $0 ~/.bashrc" >&2 - echo "or other bash profile ( here : \"~/.bashrc\" for example), the same file you have set whith set_env.sh" + echo "or other bash profile ( here : \"~/.bashrc\" for example), the same file you have set with set_env.sh" fi