install.sh: Add -x, --trace flags
This commit is contained in:
parent
8010a65795
commit
70587d5832
4 changed files with 21 additions and 5 deletions
|
|
@ -15,7 +15,7 @@ help() {
|
|||
|
||||
cat <<EOF
|
||||
usage: $arg0 [-d|--dry-run] [--version vX.X.X] [--edge] [--method detect] [--prefix path]
|
||||
[--tala latest] [--force] [--uninstall]
|
||||
[--tala latest] [--force] [--uninstall] [-x|--trace]
|
||||
|
||||
install.sh automates the installation of D2 onto your system. It currently only supports
|
||||
the installation of standalone releases from GitHub and via Homebrew on macOS. See the
|
||||
|
|
@ -93,6 +93,9 @@ Flags:
|
|||
package manager to uninstall instead.
|
||||
note: tala will also be uninstalled if installed.
|
||||
|
||||
-x, --trace:
|
||||
Run script with set -x.
|
||||
|
||||
All downloaded archives are cached into ~/.cache/d2/release. use \$XDG_CACHE_HOME to change
|
||||
path of the cached assets. Release archives are unarchived into \$PREFIX/lib/d2/d2-<VERSION>
|
||||
|
||||
|
|
@ -147,6 +150,11 @@ main() {
|
|||
flag_noarg && shift "$FLAGSHIFT"
|
||||
UNINSTALL=1
|
||||
;;
|
||||
x|trace)
|
||||
flag_noarg && shift "$FLAGSHIFT"
|
||||
set -x
|
||||
export TRACE=1
|
||||
;;
|
||||
*)
|
||||
flag_errusage "unrecognized flag $FLAGRAW"
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ if [ "${LIB_LOG-}" ]; then
|
|||
fi
|
||||
LIB_LOG=1
|
||||
|
||||
if [ -n "${DEBUG-}" ]; then
|
||||
if [ -n "${TRACE-}" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
|
|
|
|||
2
ci/sub
2
ci/sub
|
|
@ -1 +1 @@
|
|||
Subproject commit 4beb5c09e5e3380641ee7e3b0c1d4f6358cca544
|
||||
Subproject commit 4c26167bafbb6b4d038004c7e7666b2533a882d3
|
||||
12
install.sh
12
install.sh
|
|
@ -89,7 +89,7 @@ if [ "${LIB_LOG-}" ]; then
|
|||
fi
|
||||
LIB_LOG=1
|
||||
|
||||
if [ -n "${DEBUG-}" ]; then
|
||||
if [ -n "${TRACE-}" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
|
|
@ -597,7 +597,7 @@ help() {
|
|||
|
||||
cat <<EOF
|
||||
usage: $arg0 [-d|--dry-run] [--version vX.X.X] [--edge] [--method detect] [--prefix path]
|
||||
[--tala latest] [--force] [--uninstall]
|
||||
[--tala latest] [--force] [--uninstall] [-x|--trace]
|
||||
|
||||
install.sh automates the installation of D2 onto your system. It currently only supports
|
||||
the installation of standalone releases from GitHub and via Homebrew on macOS. See the
|
||||
|
|
@ -675,6 +675,9 @@ Flags:
|
|||
package manager to uninstall instead.
|
||||
note: tala will also be uninstalled if installed.
|
||||
|
||||
-x, --trace:
|
||||
Run script with set -x.
|
||||
|
||||
All downloaded archives are cached into ~/.cache/d2/release. use \$XDG_CACHE_HOME to change
|
||||
path of the cached assets. Release archives are unarchived into \$PREFIX/lib/d2/d2-<VERSION>
|
||||
|
||||
|
|
@ -729,6 +732,11 @@ main() {
|
|||
flag_noarg && shift "$FLAGSHIFT"
|
||||
UNINSTALL=1
|
||||
;;
|
||||
x|trace)
|
||||
flag_noarg && shift "$FLAGSHIFT"
|
||||
set -x
|
||||
export TRACE=1
|
||||
;;
|
||||
*)
|
||||
flag_errusage "unrecognized flag $FLAGRAW"
|
||||
;;
|
||||
|
|
|
|||
Loading…
Reference in a new issue