{"action":"closed","number":134,"pull_request":{"url":"https://api.github.com/repos/resin-io-modules/drivelist/pulls/134","id":103747219,"html_url":"https://github.com/resin-io-modules/drivelist/pull/134","diff_url":"https://github.com/resin-io-modules/drivelist/pull/134.diff","patch_url":"https://github.com/resin-io-modules/drivelist/pull/134.patch","issue_url":"https://api.github.com/repos/resin-io-modules/drivelist/issues/134","number":134,"state":"closed","locked":false,"title":"Improve darwin.sh based on shellcheck tips","user":{"login":"jviotti","id":2192773,"avatar_url":"https://avatars.githubusercontent.com/u/2192773?v=3","gravatar_id":"","url":"https://api.github.com/users/jviotti","html_url":"https://github.com/jviotti","followers_url":"https://api.github.com/users/jviotti/followers","following_url":"https://api.github.com/users/jviotti/following{/other_user}","gists_url":"https://api.github.com/users/jviotti/gists{/gist_id}","starred_url":"https://api.github.com/users/jviotti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jviotti/subscriptions","organizations_url":"https://api.github.com/users/jviotti/orgs","repos_url":"https://api.github.com/users/jviotti/repos","events_url":"https://api.github.com/users/jviotti/events{/privacy}","received_events_url":"https://api.github.com/users/jviotti/received_events","type":"User","site_admin":false},"body":"These were the addressed warnings:\r\n\r\n```\r\nIn scripts/darwin.sh line 4:\r\n  echo $(grep \"$1\" | awk -F \"  +\" '{ print $3 }')\r\n       ^-- SC2046: Quote this to prevent word splitting.\r\n       ^-- SC2005: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.\r\n\r\nIn scripts/darwin.sh line 11:\r\nDISKS=\"`diskutil list | grep '^\\/' | get_until_paren`\"\r\n       ^-- SC2006: Use $(..) instead of legacy `..`.\r\n\r\nIn scripts/darwin.sh line 12:\r\nmount_output=\"`mount`\"\r\n              ^-- SC2006: Use $(..) instead of legacy `..`.\r\n\r\nIn scripts/darwin.sh line 15:\r\n  diskinfo=\"`diskutil info $disk`\"\r\n            ^-- SC2006: Use $(..) instead of legacy `..`.\r\n                           ^-- SC2086: Double quote to prevent globbing and word splitting.\r\n\r\nIn scripts/darwin.sh line 17:\r\n  device=`echo \"$diskinfo\" | get_key \"Device Node\"`\r\n         ^-- SC2006: Use $(..) instead of legacy `..`.\r\n\r\nIn scripts/darwin.sh line 20:\r\n  raw_device=`echo \"$device\" | sed \"s/disk/rdisk/g\"`\r\n             ^-- SC2006: Use $(..) instead of legacy `..`.\r\n              ^-- SC2001: See if you can use ${variable//search/replace} instead.\r\n\r\nIn scripts/darwin.sh line 22:\r\n  description=`echo \"$diskinfo\" | get_key \"Device / Media Name\"`\r\n              ^-- SC2006: Use $(..) instead of legacy `..`.\r\n\r\nIn scripts/darwin.sh line 23:\r\n  volume_name=`echo \"$diskinfo\" | get_key \"Volume Name\"`\r\n              ^-- SC2006: Use $(..) instead of legacy `..`.\r\n\r\nIn scripts/darwin.sh line 24:\r\n  removable=`echo \"$diskinfo\" | get_key \"Removable Media\"`\r\n            ^-- SC2006: Use $(..) instead of legacy `..`.\r\n\r\nIn scripts/darwin.sh line 25:\r\n  protected=`echo \"$diskinfo\" | get_key \"Read-Only Media\"`\r\n            ^-- SC2006: Use $(..) instead of legacy `..`.\r\n\r\nIn scripts/darwin.sh line 26:\r\n  location=`echo \"$diskinfo\" | get_key \"Device Location\"`\r\n           ^-- SC2006: Use $(..) instead of legacy `..`.\r\n\r\nIn scripts/darwin.sh line 27:\r\n  size=`echo \"$diskinfo\" | sed 's/Disk Size/Total Size/g' | get_key \"Total Size\" | perl -n -e'/\\((\\d+)\\sBytes\\)/ && print $1'`\r\n       ^-- SC2006: Use $(..) instead of legacy `..`.\r\n\r\nIn scripts/darwin.sh line 29:\r\n  mountpoints=`echo \"$mount_output\" | perl -n -e'm{^'\"${disk}\"'(s[0-9]+)? on (.*) \\(.*\\)$} && print \"$2\\n\"'`\r\n              ^-- SC2006: Use $(..) instead of legacy `..`.\r\n\r\nIn scripts/darwin.sh line 52:\r\n    echo \"$mountpoints\" | while read mountpoint ; do\r\n                                ^-- SC2162: read without -r will mangle backslashes.\r\n```\r\n\r\nSigned-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>","created_at":"2017-01-30T14:36:11Z","updated_at":"2017-01-30T18:23:19Z","closed_at":"2017-01-30T18:23:19Z","merged_at":"2017-01-30T18:23:19Z","merge_commit_sha":"378e16b172383374c021a7145c23fbd56c317fc2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/resin-io-modules/drivelist/pulls/134/commits","review_comments_url":"https://api.github.com/repos/resin-io-modules/drivelist/pulls/134/comments","review_comment_url":"https://api.github.com/repos/resin-io-modules/drivelist/pulls/comments{/number}","comments_url":"https://api.github.com/repos/resin-io-modules/drivelist/issues/134/comments","statuses_url":"https://api.github.com/repos/resin-io-modules/drivelist/statuses/a7d80ed2e65009e78abf2f264c8050543eed0399","head":{"label":"resin-io-modules:better-darwin-sh","ref":"better-darwin-sh","sha":"a7d80ed2e65009e78abf2f264c8050543eed0399","user":{"login":"resin-io-modules","id":17724750,"avatar_url":"https://avatars.githubusercontent.com/u/17724750?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io-modules","html_url":"https://github.com/resin-io-modules","followers_url":"https://api.github.com/users/resin-io-modules/followers","following_url":"https://api.github.com/users/resin-io-modules/following{/other_user}","gists_url":"https://api.github.com/users/resin-io-modules/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io-modules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io-modules/subscriptions","organizations_url":"https://api.github.com/users/resin-io-modules/orgs","repos_url":"https://api.github.com/users/resin-io-modules/repos","events_url":"https://api.github.com/users/resin-io-modules/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io-modules/received_events","type":"Organization","site_admin":false},"repo":{"id":30077787,"name":"drivelist","full_name":"resin-io-modules/drivelist","owner":{"login":"resin-io-modules","id":17724750,"avatar_url":"https://avatars.githubusercontent.com/u/17724750?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io-modules","html_url":"https://github.com/resin-io-modules","followers_url":"https://api.github.com/users/resin-io-modules/followers","following_url":"https://api.github.com/users/resin-io-modules/following{/other_user}","gists_url":"https://api.github.com/users/resin-io-modules/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io-modules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io-modules/subscriptions","organizations_url":"https://api.github.com/users/resin-io-modules/orgs","repos_url":"https://api.github.com/users/resin-io-modules/repos","events_url":"https://api.github.com/users/resin-io-modules/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io-modules/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/resin-io-modules/drivelist","description":"List all connected drives in your computer, in all major operating systems.","fork":false,"url":"https://api.github.com/repos/resin-io-modules/drivelist","forks_url":"https://api.github.com/repos/resin-io-modules/drivelist/forks","keys_url":"https://api.github.com/repos/resin-io-modules/drivelist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/resin-io-modules/drivelist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/resin-io-modules/drivelist/teams","hooks_url":"https://api.github.com/repos/resin-io-modules/drivelist/hooks","issue_events_url":"https://api.github.com/repos/resin-io-modules/drivelist/issues/events{/number}","events_url":"https://api.github.com/repos/resin-io-modules/drivelist/events","assignees_url":"https://api.github.com/repos/resin-io-modules/drivelist/assignees{/user}","branches_url":"https://api.github.com/repos/resin-io-modules/drivelist/branches{/branch}","tags_url":"https://api.github.com/repos/resin-io-modules/drivelist/tags","blobs_url":"https://api.github.com/repos/resin-io-modules/drivelist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/resin-io-modules/drivelist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/resin-io-modules/drivelist/git/refs{/sha}","trees_url":"https://api.github.com/repos/resin-io-modules/drivelist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/resin-io-modules/drivelist/statuses/{sha}","languages_url":"https://api.github.com/repos/resin-io-modules/drivelist/languages","stargazers_url":"https://api.github.com/repos/resin-io-modules/drivelist/stargazers","contributors_url":"https://api.github.com/repos/resin-io-modules/drivelist/contributors","subscribers_url":"https://api.github.com/repos/resin-io-modules/drivelist/subscribers","subscription_url":"https://api.github.com/repos/resin-io-modules/drivelist/subscription","commits_url":"https://api.github.com/repos/resin-io-modules/drivelist/commits{/sha}","git_commits_url":"https://api.github.com/repos/resin-io-modules/drivelist/git/commits{/sha}","comments_url":"https://api.github.com/repos/resin-io-modules/drivelist/comments{/number}","issue_comment_url":"https://api.github.com/repos/resin-io-modules/drivelist/issues/comments{/number}","contents_url":"https://api.github.com/repos/resin-io-modules/drivelist/contents/{+path}","compare_url":"https://api.github.com/repos/resin-io-modules/drivelist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/resin-io-modules/drivelist/merges","archive_url":"https://api.github.com/repos/resin-io-modules/drivelist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/resin-io-modules/drivelist/downloads","issues_url":"https://api.github.com/repos/resin-io-modules/drivelist/issues{/number}","pulls_url":"https://api.github.com/repos/resin-io-modules/drivelist/pulls{/number}","milestones_url":"https://api.github.com/repos/resin-io-modules/drivelist/milestones{/number}","notifications_url":"https://api.github.com/repos/resin-io-modules/drivelist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/resin-io-modules/drivelist/labels{/name}","releases_url":"https://api.github.com/repos/resin-io-modules/drivelist/releases{/id}","deployments_url":"https://api.github.com/repos/resin-io-modules/drivelist/deployments","created_at":"2015-01-30T15:27:41Z","updated_at":"2017-01-23T07:13:34Z","pushed_at":"2017-01-30T18:23:19Z","git_url":"git://github.com/resin-io-modules/drivelist.git","ssh_url":"git@github.com:resin-io-modules/drivelist.git","clone_url":"https://github.com/resin-io-modules/drivelist.git","svn_url":"https://github.com/resin-io-modules/drivelist","homepage":null,"size":202,"stargazers_count":54,"watchers_count":54,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":6,"forks":23,"open_issues":6,"watchers":54,"default_branch":"master"}},"base":{"label":"resin-io-modules:master","ref":"master","sha":"ecef3a7d0b9279ebe34137ab72278d04455aad17","user":{"login":"resin-io-modules","id":17724750,"avatar_url":"https://avatars.githubusercontent.com/u/17724750?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io-modules","html_url":"https://github.com/resin-io-modules","followers_url":"https://api.github.com/users/resin-io-modules/followers","following_url":"https://api.github.com/users/resin-io-modules/following{/other_user}","gists_url":"https://api.github.com/users/resin-io-modules/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io-modules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io-modules/subscriptions","organizations_url":"https://api.github.com/users/resin-io-modules/orgs","repos_url":"https://api.github.com/users/resin-io-modules/repos","events_url":"https://api.github.com/users/resin-io-modules/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io-modules/received_events","type":"Organization","site_admin":false},"repo":{"id":30077787,"name":"drivelist","full_name":"resin-io-modules/drivelist","owner":{"login":"resin-io-modules","id":17724750,"avatar_url":"https://avatars.githubusercontent.com/u/17724750?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io-modules","html_url":"https://github.com/resin-io-modules","followers_url":"https://api.github.com/users/resin-io-modules/followers","following_url":"https://api.github.com/users/resin-io-modules/following{/other_user}","gists_url":"https://api.github.com/users/resin-io-modules/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io-modules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io-modules/subscriptions","organizations_url":"https://api.github.com/users/resin-io-modules/orgs","repos_url":"https://api.github.com/users/resin-io-modules/repos","events_url":"https://api.github.com/users/resin-io-modules/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io-modules/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/resin-io-modules/drivelist","description":"List all connected drives in your computer, in all major operating systems.","fork":false,"url":"https://api.github.com/repos/resin-io-modules/drivelist","forks_url":"https://api.github.com/repos/resin-io-modules/drivelist/forks","keys_url":"https://api.github.com/repos/resin-io-modules/drivelist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/resin-io-modules/drivelist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/resin-io-modules/drivelist/teams","hooks_url":"https://api.github.com/repos/resin-io-modules/drivelist/hooks","issue_events_url":"https://api.github.com/repos/resin-io-modules/drivelist/issues/events{/number}","events_url":"https://api.github.com/repos/resin-io-modules/drivelist/events","assignees_url":"https://api.github.com/repos/resin-io-modules/drivelist/assignees{/user}","branches_url":"https://api.github.com/repos/resin-io-modules/drivelist/branches{/branch}","tags_url":"https://api.github.com/repos/resin-io-modules/drivelist/tags","blobs_url":"https://api.github.com/repos/resin-io-modules/drivelist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/resin-io-modules/drivelist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/resin-io-modules/drivelist/git/refs{/sha}","trees_url":"https://api.github.com/repos/resin-io-modules/drivelist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/resin-io-modules/drivelist/statuses/{sha}","languages_url":"https://api.github.com/repos/resin-io-modules/drivelist/languages","stargazers_url":"https://api.github.com/repos/resin-io-modules/drivelist/stargazers","contributors_url":"https://api.github.com/repos/resin-io-modules/drivelist/contributors","subscribers_url":"https://api.github.com/repos/resin-io-modules/drivelist/subscribers","subscription_url":"https://api.github.com/repos/resin-io-modules/drivelist/subscription","commits_url":"https://api.github.com/repos/resin-io-modules/drivelist/commits{/sha}","git_commits_url":"https://api.github.com/repos/resin-io-modules/drivelist/git/commits{/sha}","comments_url":"https://api.github.com/repos/resin-io-modules/drivelist/comments{/number}","issue_comment_url":"https://api.github.com/repos/resin-io-modules/drivelist/issues/comments{/number}","contents_url":"https://api.github.com/repos/resin-io-modules/drivelist/contents/{+path}","compare_url":"https://api.github.com/repos/resin-io-modules/drivelist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/resin-io-modules/drivelist/merges","archive_url":"https://api.github.com/repos/resin-io-modules/drivelist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/resin-io-modules/drivelist/downloads","issues_url":"https://api.github.com/repos/resin-io-modules/drivelist/issues{/number}","pulls_url":"https://api.github.com/repos/resin-io-modules/drivelist/pulls{/number}","milestones_url":"https://api.github.com/repos/resin-io-modules/drivelist/milestones{/number}","notifications_url":"https://api.github.com/repos/resin-io-modules/drivelist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/resin-io-modules/drivelist/labels{/name}","releases_url":"https://api.github.com/repos/resin-io-modules/drivelist/releases{/id}","deployments_url":"https://api.github.com/repos/resin-io-modules/drivelist/deployments","created_at":"2015-01-30T15:27:41Z","updated_at":"2017-01-23T07:13:34Z","pushed_at":"2017-01-30T18:23:19Z","git_url":"git://github.com/resin-io-modules/drivelist.git","ssh_url":"git@github.com:resin-io-modules/drivelist.git","clone_url":"https://github.com/resin-io-modules/drivelist.git","svn_url":"https://github.com/resin-io-modules/drivelist","homepage":null,"size":202,"stargazers_count":54,"watchers_count":54,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":6,"forks":23,"open_issues":6,"watchers":54,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/resin-io-modules/drivelist/pulls/134"},"html":{"href":"https://github.com/resin-io-modules/drivelist/pull/134"},"issue":{"href":"https://api.github.com/repos/resin-io-modules/drivelist/issues/134"},"comments":{"href":"https://api.github.com/repos/resin-io-modules/drivelist/issues/134/comments"},"review_comments":{"href":"https://api.github.com/repos/resin-io-modules/drivelist/pulls/134/comments"},"review_comment":{"href":"https://api.github.com/repos/resin-io-modules/drivelist/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/resin-io-modules/drivelist/pulls/134/commits"},"statuses":{"href":"https://api.github.com/repos/resin-io-modules/drivelist/statuses/a7d80ed2e65009e78abf2f264c8050543eed0399"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"jviotti","id":2192773,"avatar_url":"https://avatars.githubusercontent.com/u/2192773?v=3","gravatar_id":"","url":"https://api.github.com/users/jviotti","html_url":"https://github.com/jviotti","followers_url":"https://api.github.com/users/jviotti/followers","following_url":"https://api.github.com/users/jviotti/following{/other_user}","gists_url":"https://api.github.com/users/jviotti/gists{/gist_id}","starred_url":"https://api.github.com/users/jviotti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jviotti/subscriptions","organizations_url":"https://api.github.com/users/jviotti/orgs","repos_url":"https://api.github.com/users/jviotti/repos","events_url":"https://api.github.com/users/jviotti/events{/privacy}","received_events_url":"https://api.github.com/users/jviotti/received_events","type":"User","site_admin":false},"comments":0,"review_comments":11,"maintainer_can_modify":false,"commits":1,"additions":26,"deletions":18,"changed_files":1}}
{"actor":{"display_login":"jviotti"}}