summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bashrc/main.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/bashrc/main.sh b/bashrc/main.sh
index 0552035..badbc78 100644
--- a/bashrc/main.sh
+++ b/bashrc/main.sh
@@ -10,7 +10,11 @@ declare -r _DOTFILES_DIR="${HOME}/.dotfiles"
declare -r _BASHRC_DIR="${_DOTFILES_DIR}/bashrc"
# start in home dir
-cd "${HOME}"
+if [[ -n "${DIR}" ]]; then
+ cd "${DIR}"
+else
+ cd "${HOME}"
+fi
# self update magic
_self_update() {