Add -v switch
And move VERSION to share/portzap/VERSION
This commit is contained in:
parent
6c594ee36e
commit
3c8697f186
2 changed files with 10 additions and 0 deletions
10
bin/portzap
10
bin/portzap
|
@ -40,6 +40,16 @@ require_dependency() {
|
|||
|
||||
##
|
||||
# main
|
||||
i=1
|
||||
while [ "${i}" -le "$#" ]; do
|
||||
eval "_portzap_option=\$${i}"
|
||||
if [ "${_portzap_option}" = "-v" ]; then
|
||||
echo $(cat "${rootdir}"/../share/portzap/VERSION)
|
||||
exit 0
|
||||
fi
|
||||
i=$(expr "${i}" + 1);
|
||||
done
|
||||
|
||||
case $1 in
|
||||
"clone")
|
||||
require_dependency "git doas"
|
||||
|
|
Loading…
Reference in a new issue