{"action":"created","comment":{"url":"https://api.github.com/repos/apache/flink/pulls/comments/68750010","id":68750010,"diff_hunk":"@@ -17,20 +17,41 @@\n # limitations under the License.\n ################################################################################\n \n-target=\"$0\"\n # For the case, the executable has been directly symlinked, figure out\n # the correct bin path by following its symlink up to an upper bound.\n # Note: we can't use the readlink utility here if we want to be POSIX\n # compatible.\n-iteration=0\n-while [ -L \"$target\" ]; do\n-    if [ \"$iteration\" -gt 100 ]; then\n-        echo \"Cannot resolve path: You have a cyclic symlink in $target.\"\n+followSymLink() {\n+    local iteration=0\n+    local bar=$1\n+    while [ -L \"$bar\" ]; do\n+        if [ \"$iteration\" -gt 100 ]; then\n+            echo \"Cannot resolve path: You have a cyclic symlink in $bar.\"\n+            break\n+        fi\n+        ls=`ls -ld -- \"$bar\"`\n+        bar=`expr \"$ls\" : '.* -> \\(.*\\)$'`\n+        iteration=$((iteration + 1))\n+    done\n+\n+    echo \"$bar\"\n+}\n+\n+target=$(followSymLink \"$0\")\n+\n+#Search --configDir into the parameters and set it as FLINK_CONF_DIR\n+args=(\"$@\")\n+for i in \"${!args[@]}\"; do\n+    if [ ${args[$i]} = \"--configDir\" ]; then\n+        dir=$(followSymLink \"${args[$(($i+1))]}\" )\n+        if [ -d \"$dir\" ]; then\n+            FLINK_CONF_DIR=`cd \"${dir}\"; pwd -P`","path":"flink-dist/src/main/flink-bin/bin/flink","position":null,"original_position":37,"commit_id":"1ef5011bbbef7aa976f83714fd2b88e2fa556c58","original_commit_id":"76283d3f0fbf5454b208ba1887d847acea09640d","user":{"login":"alkagin","id":9537251,"avatar_url":"https://avatars.githubusercontent.com/u/9537251?v=3","gravatar_id":"","url":"https://api.github.com/users/alkagin","html_url":"https://github.com/alkagin","followers_url":"https://api.github.com/users/alkagin/followers","following_url":"https://api.github.com/users/alkagin/following{/other_user}","gists_url":"https://api.github.com/users/alkagin/gists{/gist_id}","starred_url":"https://api.github.com/users/alkagin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alkagin/subscriptions","organizations_url":"https://api.github.com/users/alkagin/orgs","repos_url":"https://api.github.com/users/alkagin/repos","events_url":"https://api.github.com/users/alkagin/events{/privacy}","received_events_url":"https://api.github.com/users/alkagin/received_events","type":"User","site_admin":false},"body":"Added chained version, the second command runs only if the first was successful; i think it is a more correct behaviour.","created_at":"2016-06-28T12:53:51Z","updated_at":"2016-06-28T12:53:51Z","html_url":"https://github.com/apache/flink/pull/2149#discussion_r68750010","pull_request_url":"https://api.github.com/repos/apache/flink/pulls/2149","_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/comments/68750010"},"html":{"href":"https://github.com/apache/flink/pull/2149#discussion_r68750010"},"pull_request":{"href":"https://api.github.com/repos/apache/flink/pulls/2149"}}},"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/2149","id":74926522,"html_url":"https://github.com/apache/flink/pull/2149","diff_url":"https://github.com/apache/flink/pull/2149.diff","patch_url":"https://github.com/apache/flink/pull/2149.patch","issue_url":"https://api.github.com/repos/apache/flink/issues/2149","number":2149,"state":"open","locked":false,"title":"[FLINK-4084] Add configDir parameter to CliFrontend and flink shell script","user":{"login":"alkagin","id":9537251,"avatar_url":"https://avatars.githubusercontent.com/u/9537251?v=3","gravatar_id":"","url":"https://api.github.com/users/alkagin","html_url":"https://github.com/alkagin","followers_url":"https://api.github.com/users/alkagin/followers","following_url":"https://api.github.com/users/alkagin/following{/other_user}","gists_url":"https://api.github.com/users/alkagin/gists{/gist_id}","starred_url":"https://api.github.com/users/alkagin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alkagin/subscriptions","organizations_url":"https://api.github.com/users/alkagin/orgs","repos_url":"https://api.github.com/users/alkagin/repos","events_url":"https://api.github.com/users/alkagin/events{/privacy}","received_events_url":"https://api.github.com/users/alkagin/received_events","type":"User","site_admin":false},"body":"Thanks for contributing to Apache Flink. Before you open your pull request, please take the following check list into consideration.\r\nIf your changes take all of the items into account, feel free to open your pull request. For more information and/or questions please refer to the [How To Contribute guide](http://flink.apache.org/how-to-contribute.html).\r\nIn addition to going through the list, please provide a meaningful description of your changes.\r\n\r\n- [ X] General\r\n  - The pull request references the related JIRA issue (\"[FLINK-XXX] Jira title text\")\r\n  - The pull request addresses only one issue\r\n  - Each commit in the PR has a meaningful commit message (including the JIRA id)\r\n\r\n- [X ] Documentation\r\n  - Documentation has been added for new functionality\r\n  - Old documentation affected by the pull request has been updated\r\n  - JavaDoc for public methods has been added\r\n\r\n- [X ] Tests & Build\r\n  - Functionality added by the pull request is covered by tests\r\n  - `mvn clean verify` has been executed successfully locally or a Travis build has passed\r\n\r\nModified flink shell script and CliFrontend to provide an option `configDir` to specify a custom configuration folder. \r\n","created_at":"2016-06-23T09:56:15Z","updated_at":"2016-06-28T12:53:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af5ffc89e993f8e0966195c75aca54e227175467","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/flink/pulls/2149/commits","review_comments_url":"https://api.github.com/repos/apache/flink/pulls/2149/comments","review_comment_url":"https://api.github.com/repos/apache/flink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/flink/issues/2149/comments","statuses_url":"https://api.github.com/repos/apache/flink/statuses/1ef5011bbbef7aa976f83714fd2b88e2fa556c58","head":{"label":"alkagin:FLINK-4084-b","ref":"FLINK-4084-b","sha":"1ef5011bbbef7aa976f83714fd2b88e2fa556c58","user":{"login":"alkagin","id":9537251,"avatar_url":"https://avatars.githubusercontent.com/u/9537251?v=3","gravatar_id":"","url":"https://api.github.com/users/alkagin","html_url":"https://github.com/alkagin","followers_url":"https://api.github.com/users/alkagin/followers","following_url":"https://api.github.com/users/alkagin/following{/other_user}","gists_url":"https://api.github.com/users/alkagin/gists{/gist_id}","starred_url":"https://api.github.com/users/alkagin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alkagin/subscriptions","organizations_url":"https://api.github.com/users/alkagin/orgs","repos_url":"https://api.github.com/users/alkagin/repos","events_url":"https://api.github.com/users/alkagin/events{/privacy}","received_events_url":"https://api.github.com/users/alkagin/received_events","type":"User","site_admin":false},"repo":{"id":61615446,"name":"flink","full_name":"alkagin/flink","owner":{"login":"alkagin","id":9537251,"avatar_url":"https://avatars.githubusercontent.com/u/9537251?v=3","gravatar_id":"","url":"https://api.github.com/users/alkagin","html_url":"https://github.com/alkagin","followers_url":"https://api.github.com/users/alkagin/followers","following_url":"https://api.github.com/users/alkagin/following{/other_user}","gists_url":"https://api.github.com/users/alkagin/gists{/gist_id}","starred_url":"https://api.github.com/users/alkagin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alkagin/subscriptions","organizations_url":"https://api.github.com/users/alkagin/orgs","repos_url":"https://api.github.com/users/alkagin/repos","events_url":"https://api.github.com/users/alkagin/events{/privacy}","received_events_url":"https://api.github.com/users/alkagin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alkagin/flink","description":"Mirror of Apache Flink","fork":true,"url":"https://api.github.com/repos/alkagin/flink","forks_url":"https://api.github.com/repos/alkagin/flink/forks","keys_url":"https://api.github.com/repos/alkagin/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alkagin/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alkagin/flink/teams","hooks_url":"https://api.github.com/repos/alkagin/flink/hooks","issue_events_url":"https://api.github.com/repos/alkagin/flink/issues/events{/number}","events_url":"https://api.github.com/repos/alkagin/flink/events","assignees_url":"https://api.github.com/repos/alkagin/flink/assignees{/user}","branches_url":"https://api.github.com/repos/alkagin/flink/branches{/branch}","tags_url":"https://api.github.com/repos/alkagin/flink/tags","blobs_url":"https://api.github.com/repos/alkagin/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alkagin/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alkagin/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/alkagin/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alkagin/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/alkagin/flink/languages","stargazers_url":"https://api.github.com/repos/alkagin/flink/stargazers","contributors_url":"https://api.github.com/repos/alkagin/flink/contributors","subscribers_url":"https://api.github.com/repos/alkagin/flink/subscribers","subscription_url":"https://api.github.com/repos/alkagin/flink/subscription","commits_url":"https://api.github.com/repos/alkagin/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/alkagin/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/alkagin/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/alkagin/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/alkagin/flink/contents/{+path}","compare_url":"https://api.github.com/repos/alkagin/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alkagin/flink/merges","archive_url":"https://api.github.com/repos/alkagin/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alkagin/flink/downloads","issues_url":"https://api.github.com/repos/alkagin/flink/issues{/number}","pulls_url":"https://api.github.com/repos/alkagin/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/alkagin/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/alkagin/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alkagin/flink/labels{/name}","releases_url":"https://api.github.com/repos/alkagin/flink/releases{/id}","deployments_url":"https://api.github.com/repos/alkagin/flink/deployments","created_at":"2016-06-21T08:15:53Z","updated_at":"2016-06-21T08:16:10Z","pushed_at":"2016-06-28T12:42:04Z","git_url":"git://github.com/alkagin/flink.git","ssh_url":"git@github.com:alkagin/flink.git","clone_url":"https://github.com/alkagin/flink.git","svn_url":"https://github.com/alkagin/flink","homepage":null,"size":91540,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"apache:master","ref":"master","sha":"cb2b76dc4c999398133c392c9fa4a8ef82e90fd5","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":20587599,"name":"flink","full_name":"apache/flink","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/flink","description":"Mirror of Apache Flink","fork":false,"url":"https://api.github.com/repos/apache/flink","forks_url":"https://api.github.com/repos/apache/flink/forks","keys_url":"https://api.github.com/repos/apache/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/flink/teams","hooks_url":"https://api.github.com/repos/apache/flink/hooks","issue_events_url":"https://api.github.com/repos/apache/flink/issues/events{/number}","events_url":"https://api.github.com/repos/apache/flink/events","assignees_url":"https://api.github.com/repos/apache/flink/assignees{/user}","branches_url":"https://api.github.com/repos/apache/flink/branches{/branch}","tags_url":"https://api.github.com/repos/apache/flink/tags","blobs_url":"https://api.github.com/repos/apache/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/flink/languages","stargazers_url":"https://api.github.com/repos/apache/flink/stargazers","contributors_url":"https://api.github.com/repos/apache/flink/contributors","subscribers_url":"https://api.github.com/repos/apache/flink/subscribers","subscription_url":"https://api.github.com/repos/apache/flink/subscription","commits_url":"https://api.github.com/repos/apache/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/flink/contents/{+path}","compare_url":"https://api.github.com/repos/apache/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/flink/merges","archive_url":"https://api.github.com/repos/apache/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/flink/downloads","issues_url":"https://api.github.com/repos/apache/flink/issues{/number}","pulls_url":"https://api.github.com/repos/apache/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/flink/labels{/name}","releases_url":"https://api.github.com/repos/apache/flink/releases{/id}","deployments_url":"https://api.github.com/repos/apache/flink/deployments","created_at":"2014-06-07T07:00:10Z","updated_at":"2016-06-28T11:50:31Z","pushed_at":"2016-06-28T12:53:20Z","git_url":"git://github.com/apache/flink.git","ssh_url":"git@github.com:apache/flink.git","clone_url":"https://github.com/apache/flink.git","svn_url":"https://github.com/apache/flink","homepage":null,"size":120469,"stargazers_count":1390,"watchers_count":1390,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":899,"mirror_url":"git://git.apache.org/flink.git","open_issues_count":116,"forks":899,"open_issues":116,"watchers":1390,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/2149"},"html":{"href":"https://github.com/apache/flink/pull/2149"},"issue":{"href":"https://api.github.com/repos/apache/flink/issues/2149"},"comments":{"href":"https://api.github.com/repos/apache/flink/issues/2149/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/flink/pulls/2149/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/flink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/flink/pulls/2149/commits"},"statuses":{"href":"https://api.github.com/repos/apache/flink/statuses/1ef5011bbbef7aa976f83714fd2b88e2fa556c58"}}}}
{"actor":{"display_login":"alkagin"}}