mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-03-31 16:37:45 +02:00
tools: added error handler to timer
This commit is contained in:
parent
e1a511b577
commit
80de5641a3
@ -36,10 +36,17 @@ stopwatch() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
no_args="true"
|
||||||
while getopts "c:sh" arg; do
|
while getopts "c:sh" arg; do
|
||||||
case $arg in
|
case $arg in
|
||||||
c) countdown $OPTARG;;
|
c) countdown $OPTARG;;
|
||||||
s) stopwatch;;
|
s) stopwatch;;
|
||||||
h) echo "$help";;
|
h) echo "$help";;
|
||||||
|
*) echo "$help";;
|
||||||
esac
|
esac
|
||||||
|
no_args="false"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ "$no_args" = "true" ]; then
|
||||||
|
echo "$help"
|
||||||
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user