{"action":"created","comment":{"url":"https://api.github.com/repos/resin-io/etcher/pulls/comments/91592881","pull_request_review_id":12103003,"id":91592881,"diff_hunk":"@@ -0,0 +1,32 @@\n+#!/bin/bash\n+\n+###\n+# Copyright 2016 resin.io\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#   http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+###\n+\n+set -e\n+set +u\n+ARGV_DEPENDENCY=$1\n+set -u\n+\n+if [ -z \"$ARGV_DEPENDENCY\" ]; then\n+  echo \"Usage: $0 <dependency>\"\n+  exit 1\n+fi\n+\n+if ! command -v $ARGV_DEPENDENCY 2>/dev/null 1>&2; then\n+  echo \"Dependency missing: $ARGV_DEPENDENCY\" 1>&2\n+  exit 1\n+fi","path":"scripts/build/check-dependency.sh","position":null,"original_position":32,"commit_id":"821780de9aebd2e2944377ca81e649b7a621f1bd","original_commit_id":"0e85fc1c30102c03013f6dacc86ff93517d66b98","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":"Done!","created_at":"2016-12-08T19:48:57Z","updated_at":"2016-12-08T19:48:57Z","html_url":"https://github.com/resin-io/etcher/pull/959#discussion_r91592881","pull_request_url":"https://api.github.com/repos/resin-io/etcher/pulls/959","_links":{"self":{"href":"https://api.github.com/repos/resin-io/etcher/pulls/comments/91592881"},"html":{"href":"https://github.com/resin-io/etcher/pull/959#discussion_r91592881"},"pull_request":{"href":"https://api.github.com/repos/resin-io/etcher/pulls/959"}}},"pull_request":{"url":"https://api.github.com/repos/resin-io/etcher/pulls/959","id":97150065,"html_url":"https://github.com/resin-io/etcher/pull/959","diff_url":"https://github.com/resin-io/etcher/pull/959.diff","patch_url":"https://github.com/resin-io/etcher/pull/959.patch","issue_url":"https://api.github.com/repos/resin-io/etcher/issues/959","number":959,"state":"open","locked":false,"title":"chore: create re-usable check-dependency.sh script","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":"We have a little snippet to check if a dependency is installed on the\r\nsystem that we're literally copy-pasting in every single script in the\r\nbuild system script collection.\r\n\r\nFor re-usability purposes, this snippet has been extracted to a\r\n`check-dependency.sh` that is called by every script that needs it.\r\n\r\nSigned-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>","created_at":"2016-12-08T16:04:41Z","updated_at":"2016-12-08T19:48:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"919c9c91f6f25030dd7b94d23540491f4731c3d8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/resin-io/etcher/pulls/959/commits","review_comments_url":"https://api.github.com/repos/resin-io/etcher/pulls/959/comments","review_comment_url":"https://api.github.com/repos/resin-io/etcher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/resin-io/etcher/issues/959/comments","statuses_url":"https://api.github.com/repos/resin-io/etcher/statuses/821780de9aebd2e2944377ca81e649b7a621f1bd","head":{"label":"resin-io:check-dependency","ref":"check-dependency","sha":"821780de9aebd2e2944377ca81e649b7a621f1bd","user":{"login":"resin-io","id":6157842,"avatar_url":"https://avatars.githubusercontent.com/u/6157842?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io","html_url":"https://github.com/resin-io","followers_url":"https://api.github.com/users/resin-io/followers","following_url":"https://api.github.com/users/resin-io/following{/other_user}","gists_url":"https://api.github.com/users/resin-io/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io/subscriptions","organizations_url":"https://api.github.com/users/resin-io/orgs","repos_url":"https://api.github.com/users/resin-io/repos","events_url":"https://api.github.com/users/resin-io/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io/received_events","type":"Organization","site_admin":false},"repo":{"id":45055693,"name":"etcher","full_name":"resin-io/etcher","owner":{"login":"resin-io","id":6157842,"avatar_url":"https://avatars.githubusercontent.com/u/6157842?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io","html_url":"https://github.com/resin-io","followers_url":"https://api.github.com/users/resin-io/followers","following_url":"https://api.github.com/users/resin-io/following{/other_user}","gists_url":"https://api.github.com/users/resin-io/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io/subscriptions","organizations_url":"https://api.github.com/users/resin-io/orgs","repos_url":"https://api.github.com/users/resin-io/repos","events_url":"https://api.github.com/users/resin-io/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/resin-io/etcher","description":"Flash OS images to SD cards & USB drives, safely and easily.","fork":false,"url":"https://api.github.com/repos/resin-io/etcher","forks_url":"https://api.github.com/repos/resin-io/etcher/forks","keys_url":"https://api.github.com/repos/resin-io/etcher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/resin-io/etcher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/resin-io/etcher/teams","hooks_url":"https://api.github.com/repos/resin-io/etcher/hooks","issue_events_url":"https://api.github.com/repos/resin-io/etcher/issues/events{/number}","events_url":"https://api.github.com/repos/resin-io/etcher/events","assignees_url":"https://api.github.com/repos/resin-io/etcher/assignees{/user}","branches_url":"https://api.github.com/repos/resin-io/etcher/branches{/branch}","tags_url":"https://api.github.com/repos/resin-io/etcher/tags","blobs_url":"https://api.github.com/repos/resin-io/etcher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/resin-io/etcher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/resin-io/etcher/git/refs{/sha}","trees_url":"https://api.github.com/repos/resin-io/etcher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/resin-io/etcher/statuses/{sha}","languages_url":"https://api.github.com/repos/resin-io/etcher/languages","stargazers_url":"https://api.github.com/repos/resin-io/etcher/stargazers","contributors_url":"https://api.github.com/repos/resin-io/etcher/contributors","subscribers_url":"https://api.github.com/repos/resin-io/etcher/subscribers","subscription_url":"https://api.github.com/repos/resin-io/etcher/subscription","commits_url":"https://api.github.com/repos/resin-io/etcher/commits{/sha}","git_commits_url":"https://api.github.com/repos/resin-io/etcher/git/commits{/sha}","comments_url":"https://api.github.com/repos/resin-io/etcher/comments{/number}","issue_comment_url":"https://api.github.com/repos/resin-io/etcher/issues/comments{/number}","contents_url":"https://api.github.com/repos/resin-io/etcher/contents/{+path}","compare_url":"https://api.github.com/repos/resin-io/etcher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/resin-io/etcher/merges","archive_url":"https://api.github.com/repos/resin-io/etcher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/resin-io/etcher/downloads","issues_url":"https://api.github.com/repos/resin-io/etcher/issues{/number}","pulls_url":"https://api.github.com/repos/resin-io/etcher/pulls{/number}","milestones_url":"https://api.github.com/repos/resin-io/etcher/milestones{/number}","notifications_url":"https://api.github.com/repos/resin-io/etcher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/resin-io/etcher/labels{/name}","releases_url":"https://api.github.com/repos/resin-io/etcher/releases{/id}","deployments_url":"https://api.github.com/repos/resin-io/etcher/deployments","created_at":"2015-10-27T16:53:23Z","updated_at":"2016-12-08T14:17:47Z","pushed_at":"2016-12-08T19:47:36Z","git_url":"git://github.com/resin-io/etcher.git","ssh_url":"git@github.com:resin-io/etcher.git","clone_url":"https://github.com/resin-io/etcher.git","svn_url":"https://github.com/resin-io/etcher","homepage":"https://etcher.io","size":12084,"stargazers_count":1415,"watchers_count":1415,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":74,"forks":81,"open_issues":74,"watchers":1415,"default_branch":"master"}},"base":{"label":"resin-io:master","ref":"master","sha":"b0f94b58ca2393a08c59b6f8f7802f33869b2507","user":{"login":"resin-io","id":6157842,"avatar_url":"https://avatars.githubusercontent.com/u/6157842?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io","html_url":"https://github.com/resin-io","followers_url":"https://api.github.com/users/resin-io/followers","following_url":"https://api.github.com/users/resin-io/following{/other_user}","gists_url":"https://api.github.com/users/resin-io/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io/subscriptions","organizations_url":"https://api.github.com/users/resin-io/orgs","repos_url":"https://api.github.com/users/resin-io/repos","events_url":"https://api.github.com/users/resin-io/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io/received_events","type":"Organization","site_admin":false},"repo":{"id":45055693,"name":"etcher","full_name":"resin-io/etcher","owner":{"login":"resin-io","id":6157842,"avatar_url":"https://avatars.githubusercontent.com/u/6157842?v=3","gravatar_id":"","url":"https://api.github.com/users/resin-io","html_url":"https://github.com/resin-io","followers_url":"https://api.github.com/users/resin-io/followers","following_url":"https://api.github.com/users/resin-io/following{/other_user}","gists_url":"https://api.github.com/users/resin-io/gists{/gist_id}","starred_url":"https://api.github.com/users/resin-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/resin-io/subscriptions","organizations_url":"https://api.github.com/users/resin-io/orgs","repos_url":"https://api.github.com/users/resin-io/repos","events_url":"https://api.github.com/users/resin-io/events{/privacy}","received_events_url":"https://api.github.com/users/resin-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/resin-io/etcher","description":"Flash OS images to SD cards & USB drives, safely and easily.","fork":false,"url":"https://api.github.com/repos/resin-io/etcher","forks_url":"https://api.github.com/repos/resin-io/etcher/forks","keys_url":"https://api.github.com/repos/resin-io/etcher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/resin-io/etcher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/resin-io/etcher/teams","hooks_url":"https://api.github.com/repos/resin-io/etcher/hooks","issue_events_url":"https://api.github.com/repos/resin-io/etcher/issues/events{/number}","events_url":"https://api.github.com/repos/resin-io/etcher/events","assignees_url":"https://api.github.com/repos/resin-io/etcher/assignees{/user}","branches_url":"https://api.github.com/repos/resin-io/etcher/branches{/branch}","tags_url":"https://api.github.com/repos/resin-io/etcher/tags","blobs_url":"https://api.github.com/repos/resin-io/etcher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/resin-io/etcher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/resin-io/etcher/git/refs{/sha}","trees_url":"https://api.github.com/repos/resin-io/etcher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/resin-io/etcher/statuses/{sha}","languages_url":"https://api.github.com/repos/resin-io/etcher/languages","stargazers_url":"https://api.github.com/repos/resin-io/etcher/stargazers","contributors_url":"https://api.github.com/repos/resin-io/etcher/contributors","subscribers_url":"https://api.github.com/repos/resin-io/etcher/subscribers","subscription_url":"https://api.github.com/repos/resin-io/etcher/subscription","commits_url":"https://api.github.com/repos/resin-io/etcher/commits{/sha}","git_commits_url":"https://api.github.com/repos/resin-io/etcher/git/commits{/sha}","comments_url":"https://api.github.com/repos/resin-io/etcher/comments{/number}","issue_comment_url":"https://api.github.com/repos/resin-io/etcher/issues/comments{/number}","contents_url":"https://api.github.com/repos/resin-io/etcher/contents/{+path}","compare_url":"https://api.github.com/repos/resin-io/etcher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/resin-io/etcher/merges","archive_url":"https://api.github.com/repos/resin-io/etcher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/resin-io/etcher/downloads","issues_url":"https://api.github.com/repos/resin-io/etcher/issues{/number}","pulls_url":"https://api.github.com/repos/resin-io/etcher/pulls{/number}","milestones_url":"https://api.github.com/repos/resin-io/etcher/milestones{/number}","notifications_url":"https://api.github.com/repos/resin-io/etcher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/resin-io/etcher/labels{/name}","releases_url":"https://api.github.com/repos/resin-io/etcher/releases{/id}","deployments_url":"https://api.github.com/repos/resin-io/etcher/deployments","created_at":"2015-10-27T16:53:23Z","updated_at":"2016-12-08T14:17:47Z","pushed_at":"2016-12-08T19:47:36Z","git_url":"git://github.com/resin-io/etcher.git","ssh_url":"git@github.com:resin-io/etcher.git","clone_url":"https://github.com/resin-io/etcher.git","svn_url":"https://github.com/resin-io/etcher","homepage":"https://etcher.io","size":12084,"stargazers_count":1415,"watchers_count":1415,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":74,"forks":81,"open_issues":74,"watchers":1415,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/resin-io/etcher/pulls/959"},"html":{"href":"https://github.com/resin-io/etcher/pull/959"},"issue":{"href":"https://api.github.com/repos/resin-io/etcher/issues/959"},"comments":{"href":"https://api.github.com/repos/resin-io/etcher/issues/959/comments"},"review_comments":{"href":"https://api.github.com/repos/resin-io/etcher/pulls/959/comments"},"review_comment":{"href":"https://api.github.com/repos/resin-io/etcher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/resin-io/etcher/pulls/959/commits"},"statuses":{"href":"https://api.github.com/repos/resin-io/etcher/statuses/821780de9aebd2e2944377ca81e649b7a621f1bd"}}}}
{"actor":{"display_login":"jviotti"}}