Skip to content

Commit

Permalink
xkb-group.sh: debug when XKB_GROUP_DEBUG=y is set (ref sergei-mironov#27
Browse files Browse the repository at this point in the history
)
  • Loading branch information
sergei-mironov committed May 24, 2019
1 parent cbfdaca commit 37b4beb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xkb-group.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/sh

die() { echo $@ >&2 ; exit 1 ; }
# debug() { echo $@ >&2 ; }
debug() { return 0 ;}
debug() { if test -n "$XKB_GROUP_DEBUG" ; then echo $@ >&2 ; fi }

usage() { (
printf "`basename $0` waits for any user input, then switches between primary and secondary layout\n"
Expand All @@ -12,6 +11,8 @@ usage() { (
printf "\tLAY2 - initial secondary layout\n"
printf "Example:\n"
printf "`basename $0` us ru - switches between 'us' and some secondary layout, initially 'ru'\n"
printf ""
printf "To debug the script, set XKB_GROUP_DEBUG to non-zero value before the start"
)>&2 ; }

while test -n "$1" ; do
Expand Down

0 comments on commit 37b4beb

Please sign in to comment.