From bfa0dd9c7b3fbbfb535915a9ad339189261d753a Mon Sep 17 00:00:00 2001 From: Max Regan Date: Sat, 11 Jul 2020 11:47:20 -0700 Subject: [PATCH] Auto-append bashrc on install --- .mgr_config/install.sh | 6 ++++++ 1 file changed, 6 insertions(+) mode change 100644 => 100755 .mgr_config/install.sh diff --git a/.mgr_config/install.sh b/.mgr_config/install.sh old mode 100644 new mode 100755 index ae0129f..459724a --- a/.mgr_config/install.sh +++ b/.mgr_config/install.sh @@ -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