diff --git a/.gitmodules b/.gitmodules index fb44678..d97d4a2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,5 +1,5 @@ [submodule "dotbot"] - path = dotbot + path = meta/dotbot url = https://github.com/anishathalye/dotbot [submodule ".config/tmux/plugins/tmux-continuum"] path = .config/tmux/plugins/tmux-continuum diff --git a/dotbot b/meta/dotbot similarity index 100% rename from dotbot rename to meta/dotbot diff --git a/install b/meta/install similarity index 61% rename from install rename to meta/install index fd08a9c..c5afa6f 100755 --- a/install +++ b/meta/install @@ -4,14 +4,15 @@ set -e CONFIG="install.conf.yaml" DOTBOT_DIR="dotbot" - DOTBOT_BIN="bin/dotbot" -BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -cd "${BASEDIR}" +cd "$(dirname "${BASH_SOURCE[0]}")" +INSTALL_DIR="$(pwd)" +BASEDIR="$(git rev-parse --show-toplevel)" + git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive git submodule update --init --recursive "${DOTBOT_DIR}" -"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}" +"${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}" ! command -v zsh >/dev/null 2>&1 || exec zsh diff --git a/install.conf.yaml b/meta/install.conf.yaml similarity index 100% rename from install.conf.yaml rename to meta/install.conf.yaml