{"action":"created","comment":{"url":"https://api.github.com/repos/bbignell/wifi-location-changer/pulls/comments/89393247","pull_request_review_id":9939138,"id":89393247,"diff_hunk":"@@ -13,19 +13,16 @@ SSID=`/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resource\n  | grep ' SSID:' | cut -d ':' -f 2 | tr -d ' '`\n \n CURRENT_LOCATION=`scselect | grep \" \\* \" | cut -d \"(\" -f 2 | cut -d \")\" -f 1`\n-\n+PREF_FILE=\"$HOME/.locationchanger\"\n # get a map of SSID -> locations from ~/.locationchanger\n # The file should contain lines with comma-separated SSID,Location values\n # A default value can be specified using the *** SSID, for example:\n #    ***,Internet\n #    SAP-Corporate,Corporate\n #    Home Network,Home\n \n-declare -A NETWORK_LOCATIONS\n-while IFS=, read -r net loc; do NETWORK_LOCATIONS[$net]=$loc; done < ~/.locationchanger\n-\n-LOOKUP_LOCATION=${NETWORK_LOCATIONS[$SSID]}\n-DEFAULT_LOCATION=${NETWORK_LOCATIONS[\"***\"]}\n+LOOKUP_LOCATION=`grep -F \"$SSID,\" $PREF_FILE | cut -f 2 -d ,`","path":"locationchanger","position":24,"original_position":24,"commit_id":"69ddc5713f0aa3d32177b5619544d5f15fd2d7a6","original_commit_id":"69ddc5713f0aa3d32177b5619544d5f15fd2d7a6","user":{"login":"bbignell","id":5312672,"avatar_url":"https://avatars.githubusercontent.com/u/5312672?v=3","gravatar_id":"","url":"https://api.github.com/users/bbignell","html_url":"https://github.com/bbignell","followers_url":"https://api.github.com/users/bbignell/followers","following_url":"https://api.github.com/users/bbignell/following{/other_user}","gists_url":"https://api.github.com/users/bbignell/gists{/gist_id}","starred_url":"https://api.github.com/users/bbignell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbignell/subscriptions","organizations_url":"https://api.github.com/users/bbignell/orgs","repos_url":"https://api.github.com/users/bbignell/repos","events_url":"https://api.github.com/users/bbignell/events{/privacy}","received_events_url":"https://api.github.com/users/bbignell/received_events","type":"User","site_admin":false},"body":"Both expressions should use a caret to indicate complete matches: `\"^$SSID,\"` and `\"^***,\"`","created_at":"2016-11-23T20:22:04Z","updated_at":"2016-11-23T20:22:04Z","html_url":"https://github.com/bbignell/wifi-location-changer/pull/2#discussion_r89393247","pull_request_url":"https://api.github.com/repos/bbignell/wifi-location-changer/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/bbignell/wifi-location-changer/pulls/comments/89393247"},"html":{"href":"https://github.com/bbignell/wifi-location-changer/pull/2#discussion_r89393247"},"pull_request":{"href":"https://api.github.com/repos/bbignell/wifi-location-changer/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/bbignell/wifi-location-changer/pulls/2","id":95069636,"html_url":"https://github.com/bbignell/wifi-location-changer/pull/2","diff_url":"https://github.com/bbignell/wifi-location-changer/pull/2.diff","patch_url":"https://github.com/bbignell/wifi-location-changer/pull/2.patch","issue_url":"https://api.github.com/repos/bbignell/wifi-location-changer/issues/2","number":2,"state":"open","locked":false,"title":"fixed installation issue and removed the dependency to bash 4","user":{"login":"amissemer","id":3843769,"avatar_url":"https://avatars.githubusercontent.com/u/3843769?v=3","gravatar_id":"","url":"https://api.github.com/users/amissemer","html_url":"https://github.com/amissemer","followers_url":"https://api.github.com/users/amissemer/followers","following_url":"https://api.github.com/users/amissemer/following{/other_user}","gists_url":"https://api.github.com/users/amissemer/gists{/gist_id}","starred_url":"https://api.github.com/users/amissemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amissemer/subscriptions","organizations_url":"https://api.github.com/users/amissemer/orgs","repos_url":"https://api.github.com/users/amissemer/repos","events_url":"https://api.github.com/users/amissemer/events{/privacy}","received_events_url":"https://api.github.com/users/amissemer/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-23T19:54:50Z","updated_at":"2016-11-23T20:22:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"52e4312ffa55d57a68cb7add9334d0fa551bbdc8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/bbignell/wifi-location-changer/pulls/2/commits","review_comments_url":"https://api.github.com/repos/bbignell/wifi-location-changer/pulls/2/comments","review_comment_url":"https://api.github.com/repos/bbignell/wifi-location-changer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bbignell/wifi-location-changer/issues/2/comments","statuses_url":"https://api.github.com/repos/bbignell/wifi-location-changer/statuses/69ddc5713f0aa3d32177b5619544d5f15fd2d7a6","head":{"label":"amissemer:master","ref":"master","sha":"69ddc5713f0aa3d32177b5619544d5f15fd2d7a6","user":{"login":"amissemer","id":3843769,"avatar_url":"https://avatars.githubusercontent.com/u/3843769?v=3","gravatar_id":"","url":"https://api.github.com/users/amissemer","html_url":"https://github.com/amissemer","followers_url":"https://api.github.com/users/amissemer/followers","following_url":"https://api.github.com/users/amissemer/following{/other_user}","gists_url":"https://api.github.com/users/amissemer/gists{/gist_id}","starred_url":"https://api.github.com/users/amissemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amissemer/subscriptions","organizations_url":"https://api.github.com/users/amissemer/orgs","repos_url":"https://api.github.com/users/amissemer/repos","events_url":"https://api.github.com/users/amissemer/events{/privacy}","received_events_url":"https://api.github.com/users/amissemer/received_events","type":"User","site_admin":false},"repo":{"id":74607454,"name":"wifi-location-changer","full_name":"amissemer/wifi-location-changer","owner":{"login":"amissemer","id":3843769,"avatar_url":"https://avatars.githubusercontent.com/u/3843769?v=3","gravatar_id":"","url":"https://api.github.com/users/amissemer","html_url":"https://github.com/amissemer","followers_url":"https://api.github.com/users/amissemer/followers","following_url":"https://api.github.com/users/amissemer/following{/other_user}","gists_url":"https://api.github.com/users/amissemer/gists{/gist_id}","starred_url":"https://api.github.com/users/amissemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amissemer/subscriptions","organizations_url":"https://api.github.com/users/amissemer/orgs","repos_url":"https://api.github.com/users/amissemer/repos","events_url":"https://api.github.com/users/amissemer/events{/privacy}","received_events_url":"https://api.github.com/users/amissemer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amissemer/wifi-location-changer","description":"automatically change location when mac os x changes wifi connection","fork":true,"url":"https://api.github.com/repos/amissemer/wifi-location-changer","forks_url":"https://api.github.com/repos/amissemer/wifi-location-changer/forks","keys_url":"https://api.github.com/repos/amissemer/wifi-location-changer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amissemer/wifi-location-changer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amissemer/wifi-location-changer/teams","hooks_url":"https://api.github.com/repos/amissemer/wifi-location-changer/hooks","issue_events_url":"https://api.github.com/repos/amissemer/wifi-location-changer/issues/events{/number}","events_url":"https://api.github.com/repos/amissemer/wifi-location-changer/events","assignees_url":"https://api.github.com/repos/amissemer/wifi-location-changer/assignees{/user}","branches_url":"https://api.github.com/repos/amissemer/wifi-location-changer/branches{/branch}","tags_url":"https://api.github.com/repos/amissemer/wifi-location-changer/tags","blobs_url":"https://api.github.com/repos/amissemer/wifi-location-changer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amissemer/wifi-location-changer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amissemer/wifi-location-changer/git/refs{/sha}","trees_url":"https://api.github.com/repos/amissemer/wifi-location-changer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amissemer/wifi-location-changer/statuses/{sha}","languages_url":"https://api.github.com/repos/amissemer/wifi-location-changer/languages","stargazers_url":"https://api.github.com/repos/amissemer/wifi-location-changer/stargazers","contributors_url":"https://api.github.com/repos/amissemer/wifi-location-changer/contributors","subscribers_url":"https://api.github.com/repos/amissemer/wifi-location-changer/subscribers","subscription_url":"https://api.github.com/repos/amissemer/wifi-location-changer/subscription","commits_url":"https://api.github.com/repos/amissemer/wifi-location-changer/commits{/sha}","git_commits_url":"https://api.github.com/repos/amissemer/wifi-location-changer/git/commits{/sha}","comments_url":"https://api.github.com/repos/amissemer/wifi-location-changer/comments{/number}","issue_comment_url":"https://api.github.com/repos/amissemer/wifi-location-changer/issues/comments{/number}","contents_url":"https://api.github.com/repos/amissemer/wifi-location-changer/contents/{+path}","compare_url":"https://api.github.com/repos/amissemer/wifi-location-changer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amissemer/wifi-location-changer/merges","archive_url":"https://api.github.com/repos/amissemer/wifi-location-changer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amissemer/wifi-location-changer/downloads","issues_url":"https://api.github.com/repos/amissemer/wifi-location-changer/issues{/number}","pulls_url":"https://api.github.com/repos/amissemer/wifi-location-changer/pulls{/number}","milestones_url":"https://api.github.com/repos/amissemer/wifi-location-changer/milestones{/number}","notifications_url":"https://api.github.com/repos/amissemer/wifi-location-changer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amissemer/wifi-location-changer/labels{/name}","releases_url":"https://api.github.com/repos/amissemer/wifi-location-changer/releases{/id}","deployments_url":"https://api.github.com/repos/amissemer/wifi-location-changer/deployments","created_at":"2016-11-23T19:26:47Z","updated_at":"2016-11-23T19:26:48Z","pushed_at":"2016-11-23T19:53:56Z","git_url":"git://github.com/amissemer/wifi-location-changer.git","ssh_url":"git@github.com:amissemer/wifi-location-changer.git","clone_url":"https://github.com/amissemer/wifi-location-changer.git","svn_url":"https://github.com/amissemer/wifi-location-changer","homepage":"","size":11,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bbignell:master","ref":"master","sha":"fefd3974c9edaff74e8e8dd6ffd0adc4fc014d00","user":{"login":"bbignell","id":5312672,"avatar_url":"https://avatars.githubusercontent.com/u/5312672?v=3","gravatar_id":"","url":"https://api.github.com/users/bbignell","html_url":"https://github.com/bbignell","followers_url":"https://api.github.com/users/bbignell/followers","following_url":"https://api.github.com/users/bbignell/following{/other_user}","gists_url":"https://api.github.com/users/bbignell/gists{/gist_id}","starred_url":"https://api.github.com/users/bbignell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbignell/subscriptions","organizations_url":"https://api.github.com/users/bbignell/orgs","repos_url":"https://api.github.com/users/bbignell/repos","events_url":"https://api.github.com/users/bbignell/events{/privacy}","received_events_url":"https://api.github.com/users/bbignell/received_events","type":"User","site_admin":false},"repo":{"id":74509318,"name":"wifi-location-changer","full_name":"bbignell/wifi-location-changer","owner":{"login":"bbignell","id":5312672,"avatar_url":"https://avatars.githubusercontent.com/u/5312672?v=3","gravatar_id":"","url":"https://api.github.com/users/bbignell","html_url":"https://github.com/bbignell","followers_url":"https://api.github.com/users/bbignell/followers","following_url":"https://api.github.com/users/bbignell/following{/other_user}","gists_url":"https://api.github.com/users/bbignell/gists{/gist_id}","starred_url":"https://api.github.com/users/bbignell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbignell/subscriptions","organizations_url":"https://api.github.com/users/bbignell/orgs","repos_url":"https://api.github.com/users/bbignell/repos","events_url":"https://api.github.com/users/bbignell/events{/privacy}","received_events_url":"https://api.github.com/users/bbignell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bbignell/wifi-location-changer","description":"automatically change location when mac os x changes wifi connection","fork":true,"url":"https://api.github.com/repos/bbignell/wifi-location-changer","forks_url":"https://api.github.com/repos/bbignell/wifi-location-changer/forks","keys_url":"https://api.github.com/repos/bbignell/wifi-location-changer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bbignell/wifi-location-changer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bbignell/wifi-location-changer/teams","hooks_url":"https://api.github.com/repos/bbignell/wifi-location-changer/hooks","issue_events_url":"https://api.github.com/repos/bbignell/wifi-location-changer/issues/events{/number}","events_url":"https://api.github.com/repos/bbignell/wifi-location-changer/events","assignees_url":"https://api.github.com/repos/bbignell/wifi-location-changer/assignees{/user}","branches_url":"https://api.github.com/repos/bbignell/wifi-location-changer/branches{/branch}","tags_url":"https://api.github.com/repos/bbignell/wifi-location-changer/tags","blobs_url":"https://api.github.com/repos/bbignell/wifi-location-changer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bbignell/wifi-location-changer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bbignell/wifi-location-changer/git/refs{/sha}","trees_url":"https://api.github.com/repos/bbignell/wifi-location-changer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bbignell/wifi-location-changer/statuses/{sha}","languages_url":"https://api.github.com/repos/bbignell/wifi-location-changer/languages","stargazers_url":"https://api.github.com/repos/bbignell/wifi-location-changer/stargazers","contributors_url":"https://api.github.com/repos/bbignell/wifi-location-changer/contributors","subscribers_url":"https://api.github.com/repos/bbignell/wifi-location-changer/subscribers","subscription_url":"https://api.github.com/repos/bbignell/wifi-location-changer/subscription","commits_url":"https://api.github.com/repos/bbignell/wifi-location-changer/commits{/sha}","git_commits_url":"https://api.github.com/repos/bbignell/wifi-location-changer/git/commits{/sha}","comments_url":"https://api.github.com/repos/bbignell/wifi-location-changer/comments{/number}","issue_comment_url":"https://api.github.com/repos/bbignell/wifi-location-changer/issues/comments{/number}","contents_url":"https://api.github.com/repos/bbignell/wifi-location-changer/contents/{+path}","compare_url":"https://api.github.com/repos/bbignell/wifi-location-changer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bbignell/wifi-location-changer/merges","archive_url":"https://api.github.com/repos/bbignell/wifi-location-changer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bbignell/wifi-location-changer/downloads","issues_url":"https://api.github.com/repos/bbignell/wifi-location-changer/issues{/number}","pulls_url":"https://api.github.com/repos/bbignell/wifi-location-changer/pulls{/number}","milestones_url":"https://api.github.com/repos/bbignell/wifi-location-changer/milestones{/number}","notifications_url":"https://api.github.com/repos/bbignell/wifi-location-changer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bbignell/wifi-location-changer/labels{/name}","releases_url":"https://api.github.com/repos/bbignell/wifi-location-changer/releases{/id}","deployments_url":"https://api.github.com/repos/bbignell/wifi-location-changer/deployments","created_at":"2016-11-22T20:12:41Z","updated_at":"2016-11-22T20:12:42Z","pushed_at":"2016-11-23T19:54:50Z","git_url":"git://github.com/bbignell/wifi-location-changer.git","ssh_url":"git@github.com:bbignell/wifi-location-changer.git","clone_url":"https://github.com/bbignell/wifi-location-changer.git","svn_url":"https://github.com/bbignell/wifi-location-changer","homepage":"","size":11,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bbignell/wifi-location-changer/pulls/2"},"html":{"href":"https://github.com/bbignell/wifi-location-changer/pull/2"},"issue":{"href":"https://api.github.com/repos/bbignell/wifi-location-changer/issues/2"},"comments":{"href":"https://api.github.com/repos/bbignell/wifi-location-changer/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/bbignell/wifi-location-changer/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/bbignell/wifi-location-changer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bbignell/wifi-location-changer/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/bbignell/wifi-location-changer/statuses/69ddc5713f0aa3d32177b5619544d5f15fd2d7a6"}}}}
{"actor":{"display_login":"bbignell"}}