bootstrap: better handling of dry run
This commit is contained in:
parent
9b3bc72eaf
commit
4ea59a778d
1 changed files with 16 additions and 1 deletions
17
bootstrap
17
bootstrap
|
@ -1,7 +1,22 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
DRY_RUN=false
|
usage() {
|
||||||
|
echo "Usage: $(basename $0) [-h] [-f]"
|
||||||
|
echo ""
|
||||||
|
echo " -h print this help and exit"
|
||||||
|
echo " -f modify filesystem rather than dry run"
|
||||||
|
}
|
||||||
|
|
||||||
|
DRY_RUN=true
|
||||||
|
while getopts 'fh' opt; do
|
||||||
|
case "$opt" in
|
||||||
|
f) DRY_RUN=false;;
|
||||||
|
h) usage; exit 0;;
|
||||||
|
*) usage; exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
DEFAULT_GIT_USER="Fernando Schauenburg"
|
DEFAULT_GIT_USER="Fernando Schauenburg"
|
||||||
DEFAULT_GIT_EMAIL="fernando@schauenburg.me"
|
DEFAULT_GIT_EMAIL="fernando@schauenburg.me"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue