From 031f1d4e9ddf8805b57321d3026c0bffa469f14e Mon Sep 17 00:00:00 2001 From: Jedrzej Orbik Date: Wed, 2 Oct 2024 00:17:27 +0200 Subject: [PATCH] Fix macos install order --- dotfiles_private | 2 +- scripts/install.sh | 31 +++++++++++++++++-------------- scripts/uninstall.sh | 1 + 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/dotfiles_private b/dotfiles_private index 0c698db..fa984a9 160000 --- a/dotfiles_private +++ b/dotfiles_private @@ -1 +1 @@ -Subproject commit 0c698db530c4e59e37288efae2e64dd0039edbe4 +Subproject commit fa984a9e4e4de3c7974859968c0e07c7d1f637ee diff --git a/scripts/install.sh b/scripts/install.sh index acfa043..0de7de9 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -86,6 +86,7 @@ if ! [ -x "$(command -v stow)" ]; then brew install stow else echo "Unsupported OS" + exit 1 fi fi @@ -97,6 +98,7 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then echo '\.DS_Store' >"$HOME/.stow-global-ignore" else echo "Unsupported OS" + exit 1 fi if [[ $install_only != true ]]; then @@ -109,20 +111,6 @@ if [[ $install_only != true ]]; then cd .. fi -if [[ $stow_only != true ]]; then - # Platform-specific config install - if [[ "$OSTYPE" == "linux-gnu"* ]]; then - "${SCRIPT_DIR}/debian/install_min.sh" - if [[ $dev == true ]]; then - "${SCRIPT_DIR}/debian/install.sh" --optional - fi - elif [[ "$OSTYPE" == "darwin"* ]]; then - "${SCRIPT_DIR}/macos/install.sh" - else - echo "Unsupported OS" - fi -fi - # Private submodule install SUBMODULE_PATH="dotfiles_private" # Check if the submodule is not empty @@ -139,3 +127,18 @@ if [[ -n "$(ls -A ${SUBMODULE_PATH})" ]]; then else echo "Private submodule is not cloned. Skipping installation." fi + +if [[ $stow_only != true ]]; then + # Platform-specific config install + if [[ "$OSTYPE" == "linux-gnu"* ]]; then + "${SCRIPT_DIR}/debian/install_min.sh" + if [[ $dev == true ]]; then + "${SCRIPT_DIR}/debian/install.sh" --optional + fi + elif [[ "$OSTYPE" == "darwin"* ]]; then + "${SCRIPT_DIR}/macos/install.sh" + else + echo "Unsupported OS" + exit 1 + fi +fi diff --git a/scripts/uninstall.sh b/scripts/uninstall.sh index 8838178..a9fe26d 100755 --- a/scripts/uninstall.sh +++ b/scripts/uninstall.sh @@ -26,6 +26,7 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then stow --dotfiles -D -t ~ macos else echo "Unsupported OS" + exit 1 fi # Unstow common