add help and version

This commit is contained in:
primardj 2024-01-26 20:33:21 +00:00
parent 63ac2e6187
commit 6c63830499

34
nfetch-startup Executable file
View 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