Fix setup stow flow
This commit is contained in:
@@ -101,7 +101,26 @@ backup_conflicting_home_files() {
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
stow_dotfiles() {
|
||||
sync_repo_managed_secret_file
|
||||
backup_conflicting_home_files
|
||||
|
||||
stow --dir="$REPO_ROOT" -D Zsh --target="$HOME" 2>/dev/null || true
|
||||
stow --dir="$REPO_ROOT" Zsh --target="$HOME"
|
||||
}
|
||||
|
||||
bootstrap_only() {
|
||||
rm -f "$REBOOT_MARKER"
|
||||
|
||||
bash "$SCRIPT_DIR/base.sh"
|
||||
handle_reboot_marker
|
||||
|
||||
stow_dotfiles
|
||||
|
||||
echo "Bootstrap setup completed."
|
||||
}
|
||||
|
||||
full_setup() {
|
||||
rm -f "$REBOOT_MARKER"
|
||||
|
||||
bash "$SCRIPT_DIR/base.sh"
|
||||
@@ -116,13 +135,23 @@ main() {
|
||||
bash "$SCRIPT_DIR/r.sh"
|
||||
handle_reboot_marker
|
||||
|
||||
sync_repo_managed_secret_file
|
||||
backup_conflicting_home_files
|
||||
|
||||
stow --dir="$REPO_ROOT" -D Zsh --target="$HOME" 2>/dev/null || true
|
||||
stow --dir="$REPO_ROOT" Zsh --target="$HOME"
|
||||
stow_dotfiles
|
||||
|
||||
echo "Full setup completed."
|
||||
}
|
||||
|
||||
main "$@"
|
||||
case "${1:-}" in
|
||||
--bootstrap-only)
|
||||
bootstrap_only
|
||||
;;
|
||||
--stow-only)
|
||||
stow_dotfiles
|
||||
;;
|
||||
"")
|
||||
full_setup
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [--bootstrap-only|--stow-only]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user