{"action":"created","comment":{"url":"https://api.github.com/repos/monome/norns-image/pulls/comments/231668029","pull_request_review_id":172686301,"id":231668029,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTY2ODAyOQ==","diff_hunk":"@@ -0,0 +1,70 @@\n+#!/usr/bin/env bash\n+\n+# CHECK DISK FREE SPACE\n+required_disk_free=200000\n+disk_free=$(df -l | grep '/dev/root' | awk '{print $4}')\n+echo \"FREE DISK SPACE: $disk_free M\"\n+if [ \"$disk_free\" -lt \"$required_disk_free\" ]; then\n+  echo \"error > NOT ENOUGH FREE DISK SPACE\"\n+  exit\n+fi\n+\n+# GET CURRENT VERSION\n+version=$(cat /home/we/version.txt)\n+echo \"CURRENT VERSION: $version\"\n+\n+# CHECK FOR USB DISK UPDATE FILES, COPY IF VALID\n+disk_mount=$(lsblk -o mountpoint | grep media)\n+if [ ! -f \"$disk_mount\" ]; then\n+  echo \"USB DISK PRESENT\"\n+  from_disk=$(ls $disk_mount | grep norns | sed 's/.norns//' | sort -r | head -1)\n+  if [ \"$from_disk\" -gt \"$version\" ]; then\n+    echo \"> COPYING FROM USB DISK\"\n+    sudo cp -v $disk_mount/$from_disk.norns /home/we/update/\n+  fi\n+fi\n+\n+# CHECK FOR LOCAL UPDATE FILES\n+local_update=$(ls /home/we/update | grep norns | sed 's/.norns//' | sort -r | head -1)\n+echo \"LOCAL UPDATE VERSION: $local_update\"\n+if [ -z \"$local_update\" ]; then\n+  echo \"error > NO UPDATES\"\n+  exit\n+fi\n+if [ \"$version\" -gt \"$local_update\" ]; then\n+  echo \"error > OLD UPDATE, NOT APPLYING\"\n+  echo \"> REMOVING UPDATES\"\n+  rm -rf /home/we/update/*","path":"update.sh","position":37,"original_position":37,"commit_id":"9bef83d7efbd42703d2cd0fdaa5b870b506df89d","original_commit_id":"9bef83d7efbd42703d2cd0fdaa5b870b506df89d","user":{"login":"pq","id":67586,"node_id":"MDQ6VXNlcjY3NTg2","avatar_url":"https://avatars3.githubusercontent.com/u/67586?v=4","gravatar_id":"","url":"https://api.github.com/users/pq","html_url":"https://github.com/pq","followers_url":"https://api.github.com/users/pq/followers","following_url":"https://api.github.com/users/pq/following{/other_user}","gists_url":"https://api.github.com/users/pq/gists{/gist_id}","starred_url":"https://api.github.com/users/pq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pq/subscriptions","organizations_url":"https://api.github.com/users/pq/orgs","repos_url":"https://api.github.com/users/pq/repos","events_url":"https://api.github.com/users/pq/events{/privacy}","received_events_url":"https://api.github.com/users/pq/received_events","type":"User","site_admin":false},"body":"`exit` here?","created_at":"2018-11-07T20:38:00Z","updated_at":"2018-11-07T20:39:16Z","html_url":"https://github.com/monome/norns-image/pull/58#discussion_r231668029","pull_request_url":"https://api.github.com/repos/monome/norns-image/pulls/58","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/monome/norns-image/pulls/comments/231668029"},"html":{"href":"https://github.com/monome/norns-image/pull/58#discussion_r231668029"},"pull_request":{"href":"https://api.github.com/repos/monome/norns-image/pulls/58"}}},"pull_request":{"url":"https://api.github.com/repos/monome/norns-image/pulls/58","id":229136198,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5MTM2MTk4","html_url":"https://github.com/monome/norns-image/pull/58","diff_url":"https://github.com/monome/norns-image/pull/58.diff","patch_url":"https://github.com/monome/norns-image/pull/58.patch","issue_url":"https://api.github.com/repos/monome/norns-image/issues/58","number":58,"state":"open","locked":false,"title":"new update script","user":{"login":"tehn","id":246896,"node_id":"MDQ6VXNlcjI0Njg5Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/246896?v=4","gravatar_id":"","url":"https://api.github.com/users/tehn","html_url":"https://github.com/tehn","followers_url":"https://api.github.com/users/tehn/followers","following_url":"https://api.github.com/users/tehn/following{/other_user}","gists_url":"https://api.github.com/users/tehn/gists{/gist_id}","starred_url":"https://api.github.com/users/tehn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tehn/subscriptions","organizations_url":"https://api.github.com/users/tehn/orgs","repos_url":"https://api.github.com/users/tehn/repos","events_url":"https://api.github.com/users/tehn/events{/privacy}","received_events_url":"https://api.github.com/users/tehn/received_events","type":"User","site_admin":false},"body":"new update method attached. forthcoming edits to norns menu lua code.\r\n\r\nhere's the new method, which will allow for more error reporting and understanding of what's going on.\r\n\r\n- update files have a custom extension (so browsers won't auto-extract) ie `181101.norns`\r\n- user puts update file in `~/update/` via SFTP or\r\n- user can put file on USB drive root\r\n- user manually runs this update file by logging in via SSH or serial:\r\n\r\n```\r\n./update.sh\r\n```\r\n\r\n- checks free disk space (point of failure earlier)\r\n- checks versions and only copies/performs when appropriate\r\n- cleans up (deletes all update files) afterwards","created_at":"2018-11-07T19:07:02Z","updated_at":"2018-11-07T20:39:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af33823684ae53a7d2954eb9c2e5558966f0c2d0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/monome/norns-image/pulls/58/commits","review_comments_url":"https://api.github.com/repos/monome/norns-image/pulls/58/comments","review_comment_url":"https://api.github.com/repos/monome/norns-image/pulls/comments{/number}","comments_url":"https://api.github.com/repos/monome/norns-image/issues/58/comments","statuses_url":"https://api.github.com/repos/monome/norns-image/statuses/9bef83d7efbd42703d2cd0fdaa5b870b506df89d","head":{"label":"monome:new_update_method","ref":"new_update_method","sha":"9bef83d7efbd42703d2cd0fdaa5b870b506df89d","user":{"login":"monome","id":318048,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxODA0OA==","avatar_url":"https://avatars1.githubusercontent.com/u/318048?v=4","gravatar_id":"","url":"https://api.github.com/users/monome","html_url":"https://github.com/monome","followers_url":"https://api.github.com/users/monome/followers","following_url":"https://api.github.com/users/monome/following{/other_user}","gists_url":"https://api.github.com/users/monome/gists{/gist_id}","starred_url":"https://api.github.com/users/monome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monome/subscriptions","organizations_url":"https://api.github.com/users/monome/orgs","repos_url":"https://api.github.com/users/monome/repos","events_url":"https://api.github.com/users/monome/events{/privacy}","received_events_url":"https://api.github.com/users/monome/received_events","type":"Organization","site_admin":false},"repo":{"id":112484910,"node_id":"MDEwOlJlcG9zaXRvcnkxMTI0ODQ5MTA=","name":"norns-image","full_name":"monome/norns-image","private":false,"owner":{"login":"monome","id":318048,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxODA0OA==","avatar_url":"https://avatars1.githubusercontent.com/u/318048?v=4","gravatar_id":"","url":"https://api.github.com/users/monome","html_url":"https://github.com/monome","followers_url":"https://api.github.com/users/monome/followers","following_url":"https://api.github.com/users/monome/following{/other_user}","gists_url":"https://api.github.com/users/monome/gists{/gist_id}","starred_url":"https://api.github.com/users/monome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monome/subscriptions","organizations_url":"https://api.github.com/users/monome/orgs","repos_url":"https://api.github.com/users/monome/repos","events_url":"https://api.github.com/users/monome/events{/privacy}","received_events_url":"https://api.github.com/users/monome/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/monome/norns-image","description":null,"fork":false,"url":"https://api.github.com/repos/monome/norns-image","forks_url":"https://api.github.com/repos/monome/norns-image/forks","keys_url":"https://api.github.com/repos/monome/norns-image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/monome/norns-image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/monome/norns-image/teams","hooks_url":"https://api.github.com/repos/monome/norns-image/hooks","issue_events_url":"https://api.github.com/repos/monome/norns-image/issues/events{/number}","events_url":"https://api.github.com/repos/monome/norns-image/events","assignees_url":"https://api.github.com/repos/monome/norns-image/assignees{/user}","branches_url":"https://api.github.com/repos/monome/norns-image/branches{/branch}","tags_url":"https://api.github.com/repos/monome/norns-image/tags","blobs_url":"https://api.github.com/repos/monome/norns-image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/monome/norns-image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/monome/norns-image/git/refs{/sha}","trees_url":"https://api.github.com/repos/monome/norns-image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/monome/norns-image/statuses/{sha}","languages_url":"https://api.github.com/repos/monome/norns-image/languages","stargazers_url":"https://api.github.com/repos/monome/norns-image/stargazers","contributors_url":"https://api.github.com/repos/monome/norns-image/contributors","subscribers_url":"https://api.github.com/repos/monome/norns-image/subscribers","subscription_url":"https://api.github.com/repos/monome/norns-image/subscription","commits_url":"https://api.github.com/repos/monome/norns-image/commits{/sha}","git_commits_url":"https://api.github.com/repos/monome/norns-image/git/commits{/sha}","comments_url":"https://api.github.com/repos/monome/norns-image/comments{/number}","issue_comment_url":"https://api.github.com/repos/monome/norns-image/issues/comments{/number}","contents_url":"https://api.github.com/repos/monome/norns-image/contents/{+path}","compare_url":"https://api.github.com/repos/monome/norns-image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/monome/norns-image/merges","archive_url":"https://api.github.com/repos/monome/norns-image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/monome/norns-image/downloads","issues_url":"https://api.github.com/repos/monome/norns-image/issues{/number}","pulls_url":"https://api.github.com/repos/monome/norns-image/pulls{/number}","milestones_url":"https://api.github.com/repos/monome/norns-image/milestones{/number}","notifications_url":"https://api.github.com/repos/monome/norns-image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/monome/norns-image/labels{/name}","releases_url":"https://api.github.com/repos/monome/norns-image/releases{/id}","deployments_url":"https://api.github.com/repos/monome/norns-image/deployments","created_at":"2017-11-29T14:23:33Z","updated_at":"2018-11-01T15:30:04Z","pushed_at":"2018-11-07T19:07:03Z","git_url":"git://github.com/monome/norns-image.git","ssh_url":"git@github.com:monome/norns-image.git","clone_url":"https://github.com/monome/norns-image.git","svn_url":"https://github.com/monome/norns-image","homepage":null,"size":1803,"stargazers_count":9,"watchers_count":9,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":7,"license":null,"forks":4,"open_issues":7,"watchers":9,"default_branch":"master"}},"base":{"label":"monome:master","ref":"master","sha":"afadaac8fe3b4807be903e0e0436c84de09b3dcb","user":{"login":"monome","id":318048,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxODA0OA==","avatar_url":"https://avatars1.githubusercontent.com/u/318048?v=4","gravatar_id":"","url":"https://api.github.com/users/monome","html_url":"https://github.com/monome","followers_url":"https://api.github.com/users/monome/followers","following_url":"https://api.github.com/users/monome/following{/other_user}","gists_url":"https://api.github.com/users/monome/gists{/gist_id}","starred_url":"https://api.github.com/users/monome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monome/subscriptions","organizations_url":"https://api.github.com/users/monome/orgs","repos_url":"https://api.github.com/users/monome/repos","events_url":"https://api.github.com/users/monome/events{/privacy}","received_events_url":"https://api.github.com/users/monome/received_events","type":"Organization","site_admin":false},"repo":{"id":112484910,"node_id":"MDEwOlJlcG9zaXRvcnkxMTI0ODQ5MTA=","name":"norns-image","full_name":"monome/norns-image","private":false,"owner":{"login":"monome","id":318048,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxODA0OA==","avatar_url":"https://avatars1.githubusercontent.com/u/318048?v=4","gravatar_id":"","url":"https://api.github.com/users/monome","html_url":"https://github.com/monome","followers_url":"https://api.github.com/users/monome/followers","following_url":"https://api.github.com/users/monome/following{/other_user}","gists_url":"https://api.github.com/users/monome/gists{/gist_id}","starred_url":"https://api.github.com/users/monome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monome/subscriptions","organizations_url":"https://api.github.com/users/monome/orgs","repos_url":"https://api.github.com/users/monome/repos","events_url":"https://api.github.com/users/monome/events{/privacy}","received_events_url":"https://api.github.com/users/monome/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/monome/norns-image","description":null,"fork":false,"url":"https://api.github.com/repos/monome/norns-image","forks_url":"https://api.github.com/repos/monome/norns-image/forks","keys_url":"https://api.github.com/repos/monome/norns-image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/monome/norns-image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/monome/norns-image/teams","hooks_url":"https://api.github.com/repos/monome/norns-image/hooks","issue_events_url":"https://api.github.com/repos/monome/norns-image/issues/events{/number}","events_url":"https://api.github.com/repos/monome/norns-image/events","assignees_url":"https://api.github.com/repos/monome/norns-image/assignees{/user}","branches_url":"https://api.github.com/repos/monome/norns-image/branches{/branch}","tags_url":"https://api.github.com/repos/monome/norns-image/tags","blobs_url":"https://api.github.com/repos/monome/norns-image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/monome/norns-image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/monome/norns-image/git/refs{/sha}","trees_url":"https://api.github.com/repos/monome/norns-image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/monome/norns-image/statuses/{sha}","languages_url":"https://api.github.com/repos/monome/norns-image/languages","stargazers_url":"https://api.github.com/repos/monome/norns-image/stargazers","contributors_url":"https://api.github.com/repos/monome/norns-image/contributors","subscribers_url":"https://api.github.com/repos/monome/norns-image/subscribers","subscription_url":"https://api.github.com/repos/monome/norns-image/subscription","commits_url":"https://api.github.com/repos/monome/norns-image/commits{/sha}","git_commits_url":"https://api.github.com/repos/monome/norns-image/git/commits{/sha}","comments_url":"https://api.github.com/repos/monome/norns-image/comments{/number}","issue_comment_url":"https://api.github.com/repos/monome/norns-image/issues/comments{/number}","contents_url":"https://api.github.com/repos/monome/norns-image/contents/{+path}","compare_url":"https://api.github.com/repos/monome/norns-image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/monome/norns-image/merges","archive_url":"https://api.github.com/repos/monome/norns-image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/monome/norns-image/downloads","issues_url":"https://api.github.com/repos/monome/norns-image/issues{/number}","pulls_url":"https://api.github.com/repos/monome/norns-image/pulls{/number}","milestones_url":"https://api.github.com/repos/monome/norns-image/milestones{/number}","notifications_url":"https://api.github.com/repos/monome/norns-image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/monome/norns-image/labels{/name}","releases_url":"https://api.github.com/repos/monome/norns-image/releases{/id}","deployments_url":"https://api.github.com/repos/monome/norns-image/deployments","created_at":"2017-11-29T14:23:33Z","updated_at":"2018-11-01T15:30:04Z","pushed_at":"2018-11-07T19:07:03Z","git_url":"git://github.com/monome/norns-image.git","ssh_url":"git@github.com:monome/norns-image.git","clone_url":"https://github.com/monome/norns-image.git","svn_url":"https://github.com/monome/norns-image","homepage":null,"size":1803,"stargazers_count":9,"watchers_count":9,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":7,"license":null,"forks":4,"open_issues":7,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/monome/norns-image/pulls/58"},"html":{"href":"https://github.com/monome/norns-image/pull/58"},"issue":{"href":"https://api.github.com/repos/monome/norns-image/issues/58"},"comments":{"href":"https://api.github.com/repos/monome/norns-image/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/monome/norns-image/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/monome/norns-image/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/monome/norns-image/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/monome/norns-image/statuses/9bef83d7efbd42703d2cd0fdaa5b870b506df89d"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"pq"}}