eprev / locationchanger

Change OS X’s network location based on the name of Wi-Fi network
404 stars 67 forks source link

Replace airport and scselect commands with the networksetup command. #29

Open amartignoni opened 1 year ago

amartignoni commented 1 year ago

MacOS has a command called "networksetup" that seems easier to parse and has by default options to list all available network locations as well as the one that is currently active.

This PR suggests replacing the current commands to find the active SSID, list of available locations and currently active location, which currently use "scselect" and a not-in-path "airport" utility, with versions relying on the "networksetup" command.