File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 3434 cat $config_dir /vpns | nl
3535}
3636
37+ function _lazy_connect_usage() {
38+ cat << EOF
39+
40+ USAGE:
41+
42+ lazy-connect
43+
44+ -i - Initialize lazy-connect.
45+ Stores the secret and VPN list to ~/.config/lazy-connect/
46+ -h - Show this help
47+ EOF
48+ }
49+
3750function _lazy_connect() {
3851 vpn_name=$1
3952 secret_key=$2
@@ -67,7 +80,7 @@ function lazy-connect() {
6780 while getopts " ih" opt; do
6881 case $opt in
6982 h)
70- echo " Usage "
83+ _lazy_connect_usage
7184 return 0
7285 ;;
7386 i)
@@ -76,12 +89,12 @@ function lazy-connect() {
7689 ;;
7790 \? )
7891 echo " Invalid Option: -$OPTARG ."
79- echo " Usage "
92+ _lazy_connect_usage
8093 return 1
8194 ;;
8295 :)
8396 echo " Option -$OPTARG requires an argument."
84- echo " Usage "
97+ _lazy_connect_usage
8598 return 1
8699 ;;
87100 esac
You can’t perform that action at this time.
0 commit comments