Closed greatant closed 12 years ago
Just did this Line 87: Add the following just below the where the key variable is defined: [[ $? -ne 0 ]] && exit
This allows cancelling out correctly
connect() is called first setting it's own (local) profile_file variable at line 77. if this file is not found the ESSID is passed to create_profile which uses it to set its own (local) profile_file variable at line 19. both of these should remain local -- i avoid sharing variables between functions.
the quotes are not needed at line 87 but they shouldn't cause any problems -- what doesn't work about it for you?
If there is no profile file named or with a matching essid, then the profile_file variable is left empty. Atleast that's what I experienced. And just gave it a quick test outside of the script.
Ohhh i see what you were saying now. I'll come up with a way to fix that and keep the local vars. Thanks.
NB: I've only tested this in my fvwm port (https://github.com/greatant/fvwm-pipemenus/blob/master/screenshot.png) of this but it should sort any issues out.
Line 19: I think the $profile_file shouldn't be a local variable. Otherwise it can't be used by the remove profile dialog and command. I've just removed the word local from Line 19, there might be better ways to do it.
Line 87: Need to remove double-quotes from around the $(zenity command) otherwise it doesn't work.
I think that's all I changed. Very helpful script. Thank you.