From d01b860b752c64610739376d19908e2cc2551c29 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sat, 18 May 2024 14:08:37 +0700 Subject: [PATCH] enhance(pre-bootstrap): Shortcut --- README.md | 2 +- pre-bootstrap | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d225f07..a47f042 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ My Setup: > [!WARNING] > This section is still WIP! -First time setup only: run `./pre-bootstrap` then follow the instruction. +First time setup only: run `./pre-bootstrap` then follow the instruction. (Or run `./pre-bootstrap - > ~/.config/zsh/include/dotfiles`) ## Recommended Project/Software - TBSM diff --git a/pre-bootstrap b/pre-bootstrap index 6f15711..0388c34 100755 --- a/pre-bootstrap +++ b/pre-bootstrap @@ -1,8 +1,10 @@ #!/bin/zsh -printf "Experimental script! Run it anyway? (y/N) " -read choice -[ "$choice" = "y" ] || exit 1 +[ "$1" = "-" ] || { + printf "Experimental script! Run it anyway? (y/N) "; + read choice; + [ "$choice" = "y" ] || exit 1; +} [ "$(cat README.md | head -n 1)" = "" ] || { >&2 echo "Current working directory is not the dotfiles is located!"; @@ -13,6 +15,7 @@ read choice info=""" ######################################################################## # Please replace '~/.config/zsh/include/dotfiles' with the code above. # +# TIPS: Run './pre-bootstrap - > ~/.config/zsh/include/dotfiles' # ######################################################################## """