Auto-append bashrc on install

This commit is contained in:
2020-07-11 11:47:20 -07:00
parent 5362d39315
commit bfa0dd9c7b

6
.mgr_config/install.sh Normal file → Executable file
View File

@@ -30,5 +30,11 @@ if [[ $? != 0 ]]; then
exit 1 exit 1
fi fi
touch $HOME/.bashrc
SRC_LINE="source ~/.mgr_config/.bashrc"
if ! grep "$SRC_LINE" $HOME/.bashrc > /dev/null; then
echo "$SRC_LINE" >> ~/.bashrc
fi
echo "Installed successfully! Restart this session or source ~/.bashrc" echo "Installed successfully! Restart this session or source ~/.bashrc"
exit 0 exit 0