add help and version
This commit is contained in:
parent
63ac2e6187
commit
6c63830499
1 changed files with 34 additions and 0 deletions
34
nfetch-startup
Executable file
34
nfetch-startup
Executable file
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
Version=0.1
|
||||
Usage=" nfetch-startup [ PARAMETTER ]
|
||||
|
||||
nfetch-startup is a simple script which execute neofetch and wait until the user press 'q'.
|
||||
|
||||
PARAMETTER
|
||||
|
||||
-h, --help Print this help and quit
|
||||
-v, --version Print the version of this script and quit.
|
||||
"
|
||||
|
||||
|
||||
for i in "$@"; do
|
||||
case "$i" in
|
||||
"-h" | "--help")
|
||||
echo "$Usage"
|
||||
exit 0
|
||||
;;
|
||||
"-v" | "--version")
|
||||
echo "nfetch-startup $Version"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Paramettre $i uknown"
|
||||
echo "$Usage"
|
||||
exit 127
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
|
Loading…
Reference in a new issue