update set and unset env
This commit is contained in:
+3
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user