{"action":"created","comment":{"url":"https://api.github.com/repos/freifunk-fulda/site-fffd/pulls/comments/39347840","id":39347840,"diff_hunk":"@@ -0,0 +1,171 @@\n+#!/bin/bash -e\n+# =====================================================================\n+# Build script for Freifunk Fulda firmware runningn on Jenkins CI\n+#\n+# Source: https://github.com/freifunk-fulda\n+# Contact: fffd-noc@lists.open-mail.net\n+# Web: https://fulda.freifunk.net\n+#\n+# Credits:\n+#   - Freifunk Darmstadt for your great support\n+# =====================================================================\n+\n+# Default make options\n+MAKEOPTS=\"-j 4 V=s\"\n+\n+# Default to build all Gluon targets if parameter -t is not set\n+GLUON_TARGETS=\"ar71xx-generic ar71xx-nand mpc85xx-generic x86-generic x86-kvm_guest\"\n+\n+# Default is set to use current work directory\n+GLUON_SITEDIR=$(pwd)\n+\n+# Set branch name\n+GIT_BRANCH=$(git symbolic-ref -q HEAD)\n+GIT_BRANCH=${GIT_BRANCH##refs/heads/}\n+GIT_BRANCH=${GIT_BRANCH:-HEAD}\n+GIT_BRANCH=${GIT_BRANCH//\\//-}\n+\n+# Specify deployment server and user\n+DEPLOYMENT_SERVER=\"firmware.fulda.freifunk.net\"\n+DEPLOYMENT_USER=\"deployment\"\n+\n+E_NOTFOUND=10\n+E_MISSING_ARG=11\n+E_WRONG_ARG=12\n+\n+# Help function used in error messages and -h option\n+usage() {\n+  echo \"\"\n+  echo \"Build script for Freifunk-Fulda gluon firmware.\"\n+  echo \"\"\n+  echo \"-c: Build command, [ update | download | build | upload ]\"\n+  echo \"-d: Enable bash debug output\"\n+  echo \"-h: Show this help\"\n+  echo \"-m: Optional setting for make options.\"\n+  echo \"    Default is \\\"${MAKEOPTS}\\\"\"\n+  echo \"-n: String for build number, e.g. b48\"\n+  echo \"-t: Set gluon targets for build.\"\n+  echo \"    Default is: \\\"${GLUON_TARGETS}\\\"\"\n+  echo \"-w: Path for workspace used for Gluon site directory, e.g. current work directoy\"\n+  echo \"    Default is: \\\"${GLUON_SITEDIR}\\\"\"\n+}\n+\n+# Evaluate arguments for build script.\n+if [[ \"${#}\" == 0 ]]; then\n+  usage\n+  exit E_MISSING_ARG\n+fi\n+\n+# Evaluate arguments for build script.\n+while getopts b:c:dhm:n:t:w: flag; do\n+  case ${flag} in\n+    b)\n+        GIT_BRANCH=${OPTARG}\n+        ;;\n+    c)\n+      case ${OPTARG} in\n+        update)\n+        COMMAND=${OPTARG}\n+        ;;\n+        download)\n+        COMMAND=${OPTARG}\n+        ;;\n+        build)\n+        COMMAND=${OPTARG}\n+        ;;\n+        upload)\n+        COMMAND=${OPTARG}\n+        ;;\n+        *)\n+          echo \"Error: Invalid build command set.\"\n+          usage\n+          exit E_WRONG_ARG\n+          ;;\n+      esac\n+      ;;\n+    d)\n+      set -x\n+      ;;\n+    h)\n+      usage\n+      ;;\n+    m)\n+      MAKEOPTS=${OPTARG}\n+      ;;\n+    n)\n+      BUILD_NUMBER=${OPTARG}\n+      ;;\n+    t)\n+      GLUON_TARGETS=${OPTARG}\n+      ;;\n+    w)\n+      # Use the root project as site-config for make commands below\n+      GLUON_SITEDIR=${OPTARG}\n+      ;;\n+    *)\n+      usage\n+      exit;\n+      ;;\n+  esac\n+done\n+\n+shift $(( OPTIND - 1 ));\n+\n+if [ -z \"${GIT_BRANCH}\" ]; then\n+  echo \"Error: Git branch could not be detected or argument missing.\"\n+  usage\n+  exit E_MISSING_ARG\n+fi\n+\n+if [ -z \"${BUILD_NUMBER}\" ]; then\n+  echo \"Error: Build number with -n is not set.\"\n+  usage\n+  exit E_MISSING_ARG\n+fi\n+\n+if [ -z \"${COMMAND}\" ]; then\n+  echo \"Error: Build command with -c is not set.\"\n+  usage\n+  exit E_MISSING_ARG","path":"build.sh","position":null,"original_position":129,"commit_id":"8bc15cc147d2e15e45f4b3618761d3457390645f","original_commit_id":"62c04bf87debca6269b81ef260b89d0320be854a","user":{"login":"fooker","id":405105,"avatar_url":"https://avatars.githubusercontent.com/u/405105?v=3","gravatar_id":"","url":"https://api.github.com/users/fooker","html_url":"https://github.com/fooker","followers_url":"https://api.github.com/users/fooker/followers","following_url":"https://api.github.com/users/fooker/following{/other_user}","gists_url":"https://api.github.com/users/fooker/gists{/gist_id}","starred_url":"https://api.github.com/users/fooker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fooker/subscriptions","organizations_url":"https://api.github.com/users/fooker/orgs","repos_url":"https://api.github.com/users/fooker/repos","events_url":"https://api.github.com/users/fooker/events{/privacy}","received_events_url":"https://api.github.com/users/fooker/received_events","type":"User","site_admin":false},"body":"This should be ```exit \"${E_MISSING_ARG}\"```.","created_at":"2015-09-13T14:02:56Z","updated_at":"2015-09-13T14:02:56Z","html_url":"https://github.com/freifunk-fulda/site-fffd/pull/12#discussion_r39347840","pull_request_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/freifunk-fulda/site-fffd/pulls/comments/39347840"},"html":{"href":"https://github.com/freifunk-fulda/site-fffd/pull/12#discussion_r39347840"},"pull_request":{"href":"https://api.github.com/repos/freifunk-fulda/site-fffd/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/freifunk-fulda/site-fffd/pulls/12","id":44821776,"html_url":"https://github.com/freifunk-fulda/site-fffd/pull/12","diff_url":"https://github.com/freifunk-fulda/site-fffd/pull/12.diff","patch_url":"https://github.com/freifunk-fulda/site-fffd/pull/12.patch","issue_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/issues/12","number":12,"state":"open","locked":false,"title":"issue/9 Build script erstellt","user":{"login":"indigo423","id":1095181,"avatar_url":"https://avatars.githubusercontent.com/u/1095181?v=3","gravatar_id":"","url":"https://api.github.com/users/indigo423","html_url":"https://github.com/indigo423","followers_url":"https://api.github.com/users/indigo423/followers","following_url":"https://api.github.com/users/indigo423/following{/other_user}","gists_url":"https://api.github.com/users/indigo423/gists{/gist_id}","starred_url":"https://api.github.com/users/indigo423/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indigo423/subscriptions","organizations_url":"https://api.github.com/users/indigo423/orgs","repos_url":"https://api.github.com/users/indigo423/repos","events_url":"https://api.github.com/users/indigo423/events{/privacy}","received_events_url":"https://api.github.com/users/indigo423/received_events","type":"User","site_admin":false},"body":"Build script erlaubt es firmware lokal mit den gleichen parametern zu erstellen\r\nwie auf dem Jenkins build system. Zusaetzlich koennen in jedem Gluon build step\r\nunterschiedliche anzahlen von make build jobs gesetzt werden. Falls beim download\r\nserver nicht erreicht werden, kann ein paralleler Build Probleme verursachen.\r\nZusaetzlich wurde ein sign.sh script erstellt um Firmware signatur zu vereinfachen.","created_at":"2015-09-11T19:49:29Z","updated_at":"2015-09-13T14:02:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"55d8e6361ab8e36ead40819b4810879c0456051c","assignee":null,"milestone":{"url":"https://api.github.com/repos/freifunk-fulda/site-fffd/milestones/1","html_url":"https://github.com/freifunk-fulda/site-fffd/milestones/FirmwareV3","labels_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/milestones/1/labels","id":1302589,"number":1,"title":"FirmwareV3","description":"Upgrade to gluon v2015.1.x and get everything working with the new Gateway setup. \r\n\r\nThe Milestone is kept open until the changes are merged to stable branch.","creator":{"login":"Sheogorath-SI","id":8719867,"avatar_url":"https://avatars.githubusercontent.com/u/8719867?v=3","gravatar_id":"","url":"https://api.github.com/users/Sheogorath-SI","html_url":"https://github.com/Sheogorath-SI","followers_url":"https://api.github.com/users/Sheogorath-SI/followers","following_url":"https://api.github.com/users/Sheogorath-SI/following{/other_user}","gists_url":"https://api.github.com/users/Sheogorath-SI/gists{/gist_id}","starred_url":"https://api.github.com/users/Sheogorath-SI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sheogorath-SI/subscriptions","organizations_url":"https://api.github.com/users/Sheogorath-SI/orgs","repos_url":"https://api.github.com/users/Sheogorath-SI/repos","events_url":"https://api.github.com/users/Sheogorath-SI/events{/privacy}","received_events_url":"https://api.github.com/users/Sheogorath-SI/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":8,"state":"open","created_at":"2015-09-12T18:48:24Z","updated_at":"2015-09-12T20:43:58Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/pulls/12/commits","review_comments_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/pulls/12/comments","review_comment_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/issues/12/comments","statuses_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/statuses/8bc15cc147d2e15e45f4b3618761d3457390645f","head":{"label":"freifunk-fulda:issue/9","ref":"issue/9","sha":"8bc15cc147d2e15e45f4b3618761d3457390645f","user":{"login":"freifunk-fulda","id":8233203,"avatar_url":"https://avatars.githubusercontent.com/u/8233203?v=3","gravatar_id":"","url":"https://api.github.com/users/freifunk-fulda","html_url":"https://github.com/freifunk-fulda","followers_url":"https://api.github.com/users/freifunk-fulda/followers","following_url":"https://api.github.com/users/freifunk-fulda/following{/other_user}","gists_url":"https://api.github.com/users/freifunk-fulda/gists{/gist_id}","starred_url":"https://api.github.com/users/freifunk-fulda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freifunk-fulda/subscriptions","organizations_url":"https://api.github.com/users/freifunk-fulda/orgs","repos_url":"https://api.github.com/users/freifunk-fulda/repos","events_url":"https://api.github.com/users/freifunk-fulda/events{/privacy}","received_events_url":"https://api.github.com/users/freifunk-fulda/received_events","type":"Organization","site_admin":false},"repo":{"id":23543059,"name":"site-fffd","full_name":"freifunk-fulda/site-fffd","owner":{"login":"freifunk-fulda","id":8233203,"avatar_url":"https://avatars.githubusercontent.com/u/8233203?v=3","gravatar_id":"","url":"https://api.github.com/users/freifunk-fulda","html_url":"https://github.com/freifunk-fulda","followers_url":"https://api.github.com/users/freifunk-fulda/followers","following_url":"https://api.github.com/users/freifunk-fulda/following{/other_user}","gists_url":"https://api.github.com/users/freifunk-fulda/gists{/gist_id}","starred_url":"https://api.github.com/users/freifunk-fulda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freifunk-fulda/subscriptions","organizations_url":"https://api.github.com/users/freifunk-fulda/orgs","repos_url":"https://api.github.com/users/freifunk-fulda/repos","events_url":"https://api.github.com/users/freifunk-fulda/events{/privacy}","received_events_url":"https://api.github.com/users/freifunk-fulda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/freifunk-fulda/site-fffd","description":"Freifunk Fulda - Site configuration","fork":false,"url":"https://api.github.com/repos/freifunk-fulda/site-fffd","forks_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/forks","keys_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/teams","hooks_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/hooks","issue_events_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/issues/events{/number}","events_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/events","assignees_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/assignees{/user}","branches_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/branches{/branch}","tags_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/tags","blobs_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/git/refs{/sha}","trees_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/statuses/{sha}","languages_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/languages","stargazers_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/stargazers","contributors_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/contributors","subscribers_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/subscribers","subscription_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/subscription","commits_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/commits{/sha}","git_commits_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/git/commits{/sha}","comments_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/comments{/number}","issue_comment_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/issues/comments{/number}","contents_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/contents/{+path}","compare_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/merges","archive_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/downloads","issues_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/issues{/number}","pulls_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/pulls{/number}","milestones_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/milestones{/number}","notifications_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/labels{/name}","releases_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/releases{/id}","created_at":"2014-09-01T13:15:55Z","updated_at":"2015-04-08T23:25:47Z","pushed_at":"2015-09-13T14:02:33Z","git_url":"git://github.com/freifunk-fulda/site-fffd.git","ssh_url":"git@github.com:freifunk-fulda/site-fffd.git","clone_url":"https://github.com/freifunk-fulda/site-fffd.git","svn_url":"https://github.com/freifunk-fulda/site-fffd","homepage":null,"size":507,"stargazers_count":0,"watchers_count":0,"language":"Makefile","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"development"}},"base":{"label":"freifunk-fulda:development","ref":"development","sha":"16fc4f6fb6bd860fe0dd33e7f381b42cd5ee44f5","user":{"login":"freifunk-fulda","id":8233203,"avatar_url":"https://avatars.githubusercontent.com/u/8233203?v=3","gravatar_id":"","url":"https://api.github.com/users/freifunk-fulda","html_url":"https://github.com/freifunk-fulda","followers_url":"https://api.github.com/users/freifunk-fulda/followers","following_url":"https://api.github.com/users/freifunk-fulda/following{/other_user}","gists_url":"https://api.github.com/users/freifunk-fulda/gists{/gist_id}","starred_url":"https://api.github.com/users/freifunk-fulda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freifunk-fulda/subscriptions","organizations_url":"https://api.github.com/users/freifunk-fulda/orgs","repos_url":"https://api.github.com/users/freifunk-fulda/repos","events_url":"https://api.github.com/users/freifunk-fulda/events{/privacy}","received_events_url":"https://api.github.com/users/freifunk-fulda/received_events","type":"Organization","site_admin":false},"repo":{"id":23543059,"name":"site-fffd","full_name":"freifunk-fulda/site-fffd","owner":{"login":"freifunk-fulda","id":8233203,"avatar_url":"https://avatars.githubusercontent.com/u/8233203?v=3","gravatar_id":"","url":"https://api.github.com/users/freifunk-fulda","html_url":"https://github.com/freifunk-fulda","followers_url":"https://api.github.com/users/freifunk-fulda/followers","following_url":"https://api.github.com/users/freifunk-fulda/following{/other_user}","gists_url":"https://api.github.com/users/freifunk-fulda/gists{/gist_id}","starred_url":"https://api.github.com/users/freifunk-fulda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freifunk-fulda/subscriptions","organizations_url":"https://api.github.com/users/freifunk-fulda/orgs","repos_url":"https://api.github.com/users/freifunk-fulda/repos","events_url":"https://api.github.com/users/freifunk-fulda/events{/privacy}","received_events_url":"https://api.github.com/users/freifunk-fulda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/freifunk-fulda/site-fffd","description":"Freifunk Fulda - Site configuration","fork":false,"url":"https://api.github.com/repos/freifunk-fulda/site-fffd","forks_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/forks","keys_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/teams","hooks_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/hooks","issue_events_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/issues/events{/number}","events_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/events","assignees_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/assignees{/user}","branches_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/branches{/branch}","tags_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/tags","blobs_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/git/refs{/sha}","trees_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/statuses/{sha}","languages_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/languages","stargazers_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/stargazers","contributors_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/contributors","subscribers_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/subscribers","subscription_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/subscription","commits_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/commits{/sha}","git_commits_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/git/commits{/sha}","comments_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/comments{/number}","issue_comment_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/issues/comments{/number}","contents_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/contents/{+path}","compare_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/merges","archive_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/downloads","issues_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/issues{/number}","pulls_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/pulls{/number}","milestones_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/milestones{/number}","notifications_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/labels{/name}","releases_url":"https://api.github.com/repos/freifunk-fulda/site-fffd/releases{/id}","created_at":"2014-09-01T13:15:55Z","updated_at":"2015-04-08T23:25:47Z","pushed_at":"2015-09-13T14:02:33Z","git_url":"git://github.com/freifunk-fulda/site-fffd.git","ssh_url":"git@github.com:freifunk-fulda/site-fffd.git","clone_url":"https://github.com/freifunk-fulda/site-fffd.git","svn_url":"https://github.com/freifunk-fulda/site-fffd","homepage":null,"size":507,"stargazers_count":0,"watchers_count":0,"language":"Makefile","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/freifunk-fulda/site-fffd/pulls/12"},"html":{"href":"https://github.com/freifunk-fulda/site-fffd/pull/12"},"issue":{"href":"https://api.github.com/repos/freifunk-fulda/site-fffd/issues/12"},"comments":{"href":"https://api.github.com/repos/freifunk-fulda/site-fffd/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/freifunk-fulda/site-fffd/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/freifunk-fulda/site-fffd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/freifunk-fulda/site-fffd/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/freifunk-fulda/site-fffd/statuses/8bc15cc147d2e15e45f4b3618761d3457390645f"}}}}