Skip to content

Commit

Permalink
Added show version option
Browse files Browse the repository at this point in the history
  • Loading branch information
agopdev committed Mar 1, 2024
1 parent dc040fe commit c2a1b27
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/xfwall.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

export CONFIG_FILE_PATH=~/.xfwall/config.json
export XFWALL_VERSION="0.1.0"

# Monitor name
get_all_monitors() {
Expand Down Expand Up @@ -83,6 +84,11 @@ start () {
done
}

# Show versin
display_version() {
echo "xfwall version: $XFWALL_VERSION"
}

# Show help
display_help() {
echo "
Expand All @@ -96,6 +102,7 @@ display_help() {
|________________________________________________________________________| |
\________________________________________________________________________\'
Version: "$XFWALL_VERSION"
Usage: xfwall [command|option] [value]
Expand All @@ -113,6 +120,7 @@ display_help() {
-h, --help Shows this screen
-sc, --show-config Shows the actual configuration
-sm, --show-monitors Shows the available monitors
-v, --version Shows the version of xfwall
Search options:
Expand Down Expand Up @@ -312,6 +320,9 @@ print_xfwall_configuration(){

# Set options from CLI
case "$1" in
--version|-v)
display_version
;;
--help|-h)
display_help
;;
Expand Down

0 comments on commit c2a1b27

Please sign in to comment.