Commit c86be6ec authored by Konrad Grochowski's avatar Konrad Grochowski

install/common.sh - shellchecked

parent 053bea0e
#!/bin/bash
export DISABLE_TASTE_BANNER=1
TASTE_PATHS=$HOME/.bashrc.taste
PREFIX=$HOME/tool-inst
TASTE_PROFILE=$HOME/.bashrc.taste
# shellcheck disable=SC1090
[ -e "${TASTE_PROFILE}" ] && . "${TASTE_PROFILE}"
[ -e $HOME/.bashrc.taste ] && . $HOME/.bashrc.taste
UpdatePROFILE() {
if [ -z "$1" ] ; then
echo You forgot to pass argument. Aborting...
exit 1
fi
grep "$1$" "${TASTE_PROFILE}" >/dev/null || echo "$1" >> "${TASTE_PROFILE}"
}
# kept for now for backward compatibility
UpdatePATH() {
if [ -z "${PATH_CMD}" ] ; then
echo You forgot to set your PATH_CMD. Aborting...
exit 1
fi
grep "${PATH_CMD}$" ${TASTE_PATHS} >/dev/null || echo "${PATH_CMD}" >> ${TASTE_PATHS}
UpdatePROFILE "${PATH_CMD}"
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment