Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit 6cb4198

Browse files
dmiusDmitry
authored andcommitted
use --debug in nancy
1 parent 2d828b1 commit 6cb4198

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nancy

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
22

3+
DEBUG=0
34
cmd=""
45

56
case "$1" in
@@ -43,6 +44,9 @@ esac
4344

4445
while [ -n "$1" ]
4546
do
47+
if [ "$1" == "--debug" ]; then
48+
DEBUG=1
49+
fi
4650
if [ ${1%"${1#??}"} = '--' ]; then
4751
cmd="$cmd $1"
4852
else
@@ -51,7 +55,7 @@ do
5155
shift
5256
done
5357

54-
echo "CMD: $cmd"
58+
[ "$DEBUG" -eq "1" ] && echo "CMD: $cmd"
5559

5660
eval $cmd
5761

0 commit comments

Comments
 (0)