mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
test for ~/.autojump/bin within .bashrc PATH and add if necessary for single user installs
This commit is contained in:
parent
69fb7bb792
commit
6ac2bd897c
@ -30,6 +30,9 @@ export AUTOJUMP_HOME=${HOME}
|
|||||||
export AUTOJUMP_DATA_DIR=${HOME}/.autojump
|
export AUTOJUMP_DATA_DIR=${HOME}/.autojump
|
||||||
if [ ! -d ${AUTOJUMP_DATA_DIR} ]; then
|
if [ ! -d ${AUTOJUMP_DATA_DIR} ]; then
|
||||||
mkdir -p ${AUTOJUMP_DATA_DIR}
|
mkdir -p ${AUTOJUMP_DATA_DIR}
|
||||||
|
mv ~/.autojump_py "${AUTOJUMP_DATA_DIR}/autojump_py" 2>>/dev/null #migration
|
||||||
|
mv ~/.autojump_py.bak "${AUTOJUMP_DATA_DIR}/autojump_py.bak" 2>>/dev/null
|
||||||
|
mv ~/.autojump_errors "${AUTOJUMP_DATA_DIR}/autojump_errors" 2>>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AUTOJUMP='{ [[ "$AUTOJUMP_HOME" == "$HOME" ]] && (autojump -a "$(pwd -P)"&)>/dev/null 2>>${AUTOJUMP_DATA_DIR}/autojump_errors;} 2>/dev/null'
|
AUTOJUMP='{ [[ "$AUTOJUMP_HOME" == "$HOME" ]] && (autojump -a "$(pwd -P)"&)>/dev/null 2>>${AUTOJUMP_DATA_DIR}/autojump_errors;} 2>/dev/null'
|
||||||
|
@ -120,6 +120,15 @@ if [ `uname` != "Darwin" ]; then
|
|||||||
echo "# Added by autojump install.sh" >> ~/.bashrc
|
echo "# Added by autojump install.sh" >> ~/.bashrc
|
||||||
echo "source ${prefix}/etc/profile.d/autojump.bash" >> ~/.bashrc
|
echo "source ${prefix}/etc/profile.d/autojump.bash" >> ~/.bashrc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ `grep -c ".*PATH.*.autojump/bin" ~/.bashrc` -eq 0 ]; then
|
||||||
|
echo "Your .bashrc doesn't seem to have ${prefix}/bin in your \$PATH"
|
||||||
|
echo "Adding the ${prefix}/bin/ to your PATH"
|
||||||
|
echo "" >> ~/.bashrc
|
||||||
|
echo "# Added by autojump install.sh" >> ~/.bashrc
|
||||||
|
echo 'export PATH=${PATH}:~/.autojump/bin' >> ~/.bashrc
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
Loading…
Reference in New Issue
Block a user