about summary refs log tree commit diff
path: root/configs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2016-08-19T16·02-0400
committerWilliam Carroll <wpcarro@gmail.com>2016-08-19T16·02-0400
commit67f9c3f581bde8a2356d76a5120c56d72fffc7a1 (patch)
treedaf8060cb52df9ffb9a7ea99cd9a6dad3c7da410 /configs
parent6c72091f248d583246e9abc691de664589901970 (diff)
Adds script to symlink .zsh_profile and .tmux.conf to repo
Diffstat (limited to 'configs')
-rwxr-xr-xconfigs/setup_configs.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/configs/setup_configs.sh b/configs/setup_configs.sh
new file mode 100755
index 000000000000..e1a742c4b199
--- /dev/null
+++ b/configs/setup_configs.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+
+
+# .zsh_profile
+if [ -f "$HOME"/.zsh_profile ] && [ ! -L "$HOME"/.zsh_profile ]; then
+    # backup .zsh_profile
+    echo -n "Backing up .zsh_profile ... " && \
+    mv "$HOME"/.zsh_profile "$HOME"/.zsh_profile.bak && \
+    echo "Done."
+fi
+
+if [ -L "$HOME"/.zsh_profile ]; then
+    # TODO: make sure that .zsh_profile is symlinked to the correct location.
+    echo ".zsh_profile is already symlinked."
+else
+    # create symlink to pc_settings .zsh_profile
+    echo -n "Symlinking to pc_settings/configs/.zsh_profile ... " && \
+    ln -s "$HOME"/pc_settings/configs/.zsh_profile "$HOME"/.zsh_profile && \
+    echo "Done."
+fi
+
+
+# backup .tmux.conf
+if [ -f "$HOME"/.tmux.conf ] && [ ! -L "$HOME"/.tmux.conf ]; then
+    echo -n "Backing up .tmux.conf ... " && \
+    mv "$HOME"/.tmux.conf "$HOME"/.tmux.conf.bak && \
+    echo "Done."
+fi
+
+if [ -L "$HOME"/.tmux.conf ]; then
+    # TODO: make sure that .tmux.conf is symlinked to the correct location.
+    echo ".tmux.conf is already symlinked."
+else
+    # create symlink to pc_settings .tmux.conf
+    echo -n "Symlinking to pc_settings/configs/.tmux.conf ... " && \
+    ln -s "$HOME"/pc_settings/configs/.tmux.conf "$HOME"/.tmux.conf && \
+    echo "Done."
+fi
+