bootstrap: add -S -U -L and -h flags
This commit is contained in:
parent
2734ecc3c7
commit
167cf8fdb4
30
bootstrap
30
bootstrap
|
@ -17,8 +17,9 @@
|
||||||
# -d Do a dry run (only output commands, no changes)
|
# -d Do a dry run (only output commands, no changes)
|
||||||
# -y Overwrite conflicts (no prompts)
|
# -y Overwrite conflicts (no prompts)
|
||||||
# -p Prompt on file conflict (to overwrite)
|
# -p Prompt on file conflict (to overwrite)
|
||||||
# -r Refresh; the same as -ui
|
# -L Refresh links; the same as -ui
|
||||||
# -s Server mode; only install the bare minimum
|
# -S Server mode; only install the bare minimum
|
||||||
|
# -U Update mode; run update scripts only
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
source "$(cd $(dirname $0) && pwd -P)/shell/common.sh"
|
source "$(cd $(dirname $0) && pwd -P)/shell/common.sh"
|
||||||
|
@ -73,7 +74,7 @@ install=1
|
||||||
link=1
|
link=1
|
||||||
update=1
|
update=1
|
||||||
yes=0
|
yes=0
|
||||||
while getopts iuldyprs opt; do
|
while getopts iuldypLSUh opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
d) DRYRUN=1 ;;
|
d) DRYRUN=1 ;;
|
||||||
i) install= ;;
|
i) install= ;;
|
||||||
|
@ -81,9 +82,28 @@ while getopts iuldyprs opt; do
|
||||||
p) yes= ;;
|
p) yes= ;;
|
||||||
u) update= ;;
|
u) update= ;;
|
||||||
y) yes=1 ;;
|
y) yes=1 ;;
|
||||||
s) SERVER=1 ;;
|
S) SERVER=1 ;;
|
||||||
r) update=
|
U) install=
|
||||||
|
yes=0
|
||||||
|
;;
|
||||||
|
L) update=
|
||||||
install=
|
install=
|
||||||
|
yes=0
|
||||||
|
;;
|
||||||
|
h) cat <<EOL
|
||||||
|
Usage: $0 [-iuldypLSU] [topic1] [topic2] [...]
|
||||||
|
|
||||||
|
-i Don't run install scripts
|
||||||
|
-u Don't run update scripts
|
||||||
|
-l Don't symlink dotfiles or bin scripts
|
||||||
|
-d Do a dry run (only output commands, no changes)
|
||||||
|
-y Overwrite conflicts (no prompts)
|
||||||
|
-p Prompt on file conflict (to overwrite)
|
||||||
|
-L Refresh links; the same as -ui
|
||||||
|
-S Server mode; only install the bare minimum
|
||||||
|
-U Update mode; run update scripts only
|
||||||
|
EOL
|
||||||
|
exit
|
||||||
;;
|
;;
|
||||||
*) >&2 echo "Aborted."
|
*) >&2 echo "Aborted."
|
||||||
exit 1 ;;
|
exit 1 ;;
|
||||||
|
|
Loading…
Reference in a new issue