Skip to content

Commit

Permalink
Add new options
Browse files Browse the repository at this point in the history
- Force sending request to cisco router
- Login quietly without output
  • Loading branch information
coditva committed Mar 26, 2017
1 parent 65c101b commit cd0b60d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ Use terminal to issue this command: ```bitsnet```
Force login attempt
-U
Update program
-w
Force sending request to wireless
-q
Quiet mode. Don't send a notification
-h
Display help
```
Expand Down
5 changes: 4 additions & 1 deletion bitsnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source ~/.local/lib/bitsnet/util.sh
source ~/.bitsnetrc

# Parse arguments
while getopts "u:p:dhUof" o; do
while getopts "u:p:dhUofwq" o; do
case "${o}" in
u)
username=${OPTARG}
Expand All @@ -32,6 +32,9 @@ while getopts "u:p:dhUof" o; do
w)
cisco=1
;;
q)
quiet=1
;;
h | * | [?])
show_help
;;
Expand Down
6 changes: 5 additions & 1 deletion util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ function show_help {
force login attempt
-U
update
-w
Force sending request to wireless
-q
Quiet mode. Don't send a notification
-h
display help"
exit
Expand All @@ -42,7 +46,7 @@ function extract_msg {
}

function send_msg {
if [[ debug -eq 0 ]]; then
if [[ $debug == 0 || $quiet != 1 ]]; then
notify-send 'BITSnet' "$1" --icon=network-transmit
else
debug_msg "reply: $1"
Expand Down

0 comments on commit cd0b60d

Please sign in to comment.