Skip to content

Commit c74bb8e

Browse files
committed
add version tag and option to print it
1 parent 50b46ca commit c74bb8e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

init/eessi_archdetect.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env bash
2+
VERSION="1.0.0"
23

34
# Logging
45
LOG_LEVEL="INFO"
@@ -124,10 +125,11 @@ cpupath(){
124125
# Parse command line arguments
125126
USAGE="Usage: eessi_archdetect.sh [-h][-d] <action>"
126127

127-
while getopts 'hd' OPTION; do
128+
while getopts 'hdv' OPTION; do
128129
case "$OPTION" in
129130
h) echo "$USAGE"; exit 0;;
130131
d) LOG_LEVEL="DEBUG";;
132+
v) echo "eessi_archdetect.sh v$VERSION"; exit 0;;
131133
?) echo "$USAGE"; exit 1;;
132134
esac
133135
done

0 commit comments

Comments
 (0)