Merge pull request #259 from pratnala/patch-1
Change how Wi-Fi network info is received on Mac
This commit is contained in:
commit
c2b1d67cbd
|
@ -18,8 +18,8 @@ get_ssid()
|
|||
;;
|
||||
|
||||
Darwin)
|
||||
if /System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2 | sed 's/^[[:blank:]]*//g' &> /dev/null; then
|
||||
echo "$(/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | grep -E ' SSID' | cut -d ':' -f 2)" | sed 's/^[[:blank:]]*//g'
|
||||
if networksetup -getairportnetwork en0 | cut -d ':' -f 2 | sed 's/^[[:blank:]]*//g' &> /dev/null; then
|
||||
echo "$(networksetup -getairportnetwork en0 | cut -d ':' -f 2)" | sed 's/^[[:blank:]]*//g'
|
||||
else
|
||||
echo 'Ethernet'
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue