mirror of
https://github.com/km4ack/73Linux
synced 2026-08-13 17:51:54 -04:00
Merge pull request #111 from corvus-ch/preserve_system_path
Preserve system PATH
This commit is contained in:
commit
9271a7554d
1 changed files with 5 additions and 3 deletions
|
|
@ -300,9 +300,11 @@ EOF
|
|||
|
||||
#setup bin dir and put in path
|
||||
mkdir -p ${HOME}/bin
|
||||
CK=$(grep $HOME/bin $HOME/.bashrc)
|
||||
if [ -z "$CK" ]; then
|
||||
echo "export PATH=$PATH:${HOME}/bin" >>${HOME}/.bashrc
|
||||
# Add $HOME/bin to PATH
|
||||
# Prevent adding it more than once
|
||||
# Prevent adding it if already added elswhere
|
||||
if ! grep -q 'export PATH=$PATH:$HOME/bin' "${HOME}/.bashrc" && [[ ! "${PATH}" =~ "${HOME}/bin" ]]; then
|
||||
echo 'export PATH=$PATH:$HOME/bin' >> "${HOME}/.bashrc"
|
||||
fi
|
||||
|
||||
##################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue