Auto-append bashrc on install
This commit is contained in:
6
.mgr_config/install.sh
Normal file → Executable file
6
.mgr_config/install.sh
Normal file → Executable file
@@ -30,5 +30,11 @@ if [[ $? != 0 ]]; then
|
||||
exit 1
|
||||
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"
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user