{"action":"created","comment":{"url":"https://api.github.com/repos/CaptainQuirk/exx/pulls/comments/50981609","id":50981609,"diff_hunk":"@@ -0,0 +1,70 @@\n+#!/usr/bin/env sh\n+# Usage: exx install\n+# Summary: Install `exx` globally\n+\n+INSTALL_PATH=$HOME/.sub\n+COPY_DIR=$true\n+\n+copy(){\n+  CURRENT_PATH=`pwd`\n+  read -p \"Do you wish install exx into $path ? (Y/n) : \" yn\n+\n+  case $yn in\n+    [Yy]*)\n+      cp -R $CURRENT_PATH $path;\n+      symlink;\n+      break;;\n+    [Nn]*) echo \"non\"; break;;\n+    *) echo \"Please select Y/n\"\n+  esac\n+}\n+\n+symlink(){\n+  BINARY_PATH=\"/usr/local/bin/exx\"\n+  SOURCE_PATH=$path\n+\n+  if [[ \"$SOURCE_PATH\" == */exx ]]; then\n+    SOURCE_PATH=$(dirname $path)\n+  fi\n+\n+  if [ ! \\( -e \"${BINARY_PATH}\" \\) ]; then\n+    echo \"Create symlinks into $BINARY_PATH\"\n+    ln -s $SOURCE_PATH/exx/libexec/exx $BINARY_PATH\n+    echo \"Done !\"\n+    echo \"Check installation by running ``exx info`` for example\"\n+  fi\n+}\n+\n+# test if installation path exists\n+# if not, we create folder\n+if [ ! -d $INSTALL_PATH ]; then\n+  mkdir $INSTALL_PATH\n+fi\n+\n+# we ask the user installation path\n+read -p \"Path to install (default: $INSTALL_PATH) : \" path\n+\n+if [ -z \"$path\" ]; then\n+  path=$INSTALL_PATH\n+fi\n+\n+# if path is the current directory, don't copy\n+if [ \"$path\" == \".\" ]; then\n+  path=`pwd`\n+  COPY_DIR=$false\n+fi\n+\n+if [ \"$path\" == `pwd` ] && [ !$COPY_DIR ]; then\n+  symlink\n+  exit\n+fi\n+\n+# we check if exx exists into path\n+if [ ! -d \"$path/exx\" ]; then\n+  copy\n+else\n+  echo \"exx is already install into $path\"\n+  symlink","path":"libexec/exx-install","position":67,"original_position":67,"commit_id":"036af76a4f7c45e7adc406a087c6497f23619127","original_commit_id":"036af76a4f7c45e7adc406a087c6497f23619127","user":{"login":"CaptainQuirk","id":993420,"avatar_url":"https://avatars.githubusercontent.com/u/993420?v=3","gravatar_id":"","url":"https://api.github.com/users/CaptainQuirk","html_url":"https://github.com/CaptainQuirk","followers_url":"https://api.github.com/users/CaptainQuirk/followers","following_url":"https://api.github.com/users/CaptainQuirk/following{/other_user}","gists_url":"https://api.github.com/users/CaptainQuirk/gists{/gist_id}","starred_url":"https://api.github.com/users/CaptainQuirk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CaptainQuirk/subscriptions","organizations_url":"https://api.github.com/users/CaptainQuirk/orgs","repos_url":"https://api.github.com/users/CaptainQuirk/repos","events_url":"https://api.github.com/users/CaptainQuirk/events{/privacy}","received_events_url":"https://api.github.com/users/CaptainQuirk/received_events","type":"User","site_admin":false},"body":"Remove else clause and call symlink everytime","created_at":"2016-01-27T13:17:41Z","updated_at":"2016-01-27T13:17:41Z","html_url":"https://github.com/CaptainQuirk/exx/pull/1#discussion_r50981609","pull_request_url":"https://api.github.com/repos/CaptainQuirk/exx/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/CaptainQuirk/exx/pulls/comments/50981609"},"html":{"href":"https://github.com/CaptainQuirk/exx/pull/1#discussion_r50981609"},"pull_request":{"href":"https://api.github.com/repos/CaptainQuirk/exx/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/CaptainQuirk/exx/pulls/1","id":57247869,"html_url":"https://github.com/CaptainQuirk/exx/pull/1","diff_url":"https://github.com/CaptainQuirk/exx/pull/1.diff","patch_url":"https://github.com/CaptainQuirk/exx/pull/1.patch","issue_url":"https://api.github.com/repos/CaptainQuirk/exx/issues/1","number":1,"state":"open","locked":false,"title":"command process to install globally `exx`","user":{"login":"julio6114","id":1737307,"avatar_url":"https://avatars.githubusercontent.com/u/1737307?v=3","gravatar_id":"","url":"https://api.github.com/users/julio6114","html_url":"https://github.com/julio6114","followers_url":"https://api.github.com/users/julio6114/followers","following_url":"https://api.github.com/users/julio6114/following{/other_user}","gists_url":"https://api.github.com/users/julio6114/gists{/gist_id}","starred_url":"https://api.github.com/users/julio6114/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julio6114/subscriptions","organizations_url":"https://api.github.com/users/julio6114/orgs","repos_url":"https://api.github.com/users/julio6114/repos","events_url":"https://api.github.com/users/julio6114/events{/privacy}","received_events_url":"https://api.github.com/users/julio6114/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-26T18:03:08Z","updated_at":"2016-01-27T13:17:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"73ae4bae2852bd170ded1f8ed4f03d6b4a93a9b3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CaptainQuirk/exx/pulls/1/commits","review_comments_url":"https://api.github.com/repos/CaptainQuirk/exx/pulls/1/comments","review_comment_url":"https://api.github.com/repos/CaptainQuirk/exx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CaptainQuirk/exx/issues/1/comments","statuses_url":"https://api.github.com/repos/CaptainQuirk/exx/statuses/036af76a4f7c45e7adc406a087c6497f23619127","head":{"label":"julio6114:install","ref":"install","sha":"036af76a4f7c45e7adc406a087c6497f23619127","user":{"login":"julio6114","id":1737307,"avatar_url":"https://avatars.githubusercontent.com/u/1737307?v=3","gravatar_id":"","url":"https://api.github.com/users/julio6114","html_url":"https://github.com/julio6114","followers_url":"https://api.github.com/users/julio6114/followers","following_url":"https://api.github.com/users/julio6114/following{/other_user}","gists_url":"https://api.github.com/users/julio6114/gists{/gist_id}","starred_url":"https://api.github.com/users/julio6114/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julio6114/subscriptions","organizations_url":"https://api.github.com/users/julio6114/orgs","repos_url":"https://api.github.com/users/julio6114/repos","events_url":"https://api.github.com/users/julio6114/events{/privacy}","received_events_url":"https://api.github.com/users/julio6114/received_events","type":"User","site_admin":false},"repo":{"id":50436664,"name":"exx","full_name":"julio6114/exx","owner":{"login":"julio6114","id":1737307,"avatar_url":"https://avatars.githubusercontent.com/u/1737307?v=3","gravatar_id":"","url":"https://api.github.com/users/julio6114","html_url":"https://github.com/julio6114","followers_url":"https://api.github.com/users/julio6114/followers","following_url":"https://api.github.com/users/julio6114/following{/other_user}","gists_url":"https://api.github.com/users/julio6114/gists{/gist_id}","starred_url":"https://api.github.com/users/julio6114/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julio6114/subscriptions","organizations_url":"https://api.github.com/users/julio6114/orgs","repos_url":"https://api.github.com/users/julio6114/repos","events_url":"https://api.github.com/users/julio6114/events{/privacy}","received_events_url":"https://api.github.com/users/julio6114/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/julio6114/exx","description":"switch xcode version","fork":true,"url":"https://api.github.com/repos/julio6114/exx","forks_url":"https://api.github.com/repos/julio6114/exx/forks","keys_url":"https://api.github.com/repos/julio6114/exx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/julio6114/exx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/julio6114/exx/teams","hooks_url":"https://api.github.com/repos/julio6114/exx/hooks","issue_events_url":"https://api.github.com/repos/julio6114/exx/issues/events{/number}","events_url":"https://api.github.com/repos/julio6114/exx/events","assignees_url":"https://api.github.com/repos/julio6114/exx/assignees{/user}","branches_url":"https://api.github.com/repos/julio6114/exx/branches{/branch}","tags_url":"https://api.github.com/repos/julio6114/exx/tags","blobs_url":"https://api.github.com/repos/julio6114/exx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/julio6114/exx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/julio6114/exx/git/refs{/sha}","trees_url":"https://api.github.com/repos/julio6114/exx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/julio6114/exx/statuses/{sha}","languages_url":"https://api.github.com/repos/julio6114/exx/languages","stargazers_url":"https://api.github.com/repos/julio6114/exx/stargazers","contributors_url":"https://api.github.com/repos/julio6114/exx/contributors","subscribers_url":"https://api.github.com/repos/julio6114/exx/subscribers","subscription_url":"https://api.github.com/repos/julio6114/exx/subscription","commits_url":"https://api.github.com/repos/julio6114/exx/commits{/sha}","git_commits_url":"https://api.github.com/repos/julio6114/exx/git/commits{/sha}","comments_url":"https://api.github.com/repos/julio6114/exx/comments{/number}","issue_comment_url":"https://api.github.com/repos/julio6114/exx/issues/comments{/number}","contents_url":"https://api.github.com/repos/julio6114/exx/contents/{+path}","compare_url":"https://api.github.com/repos/julio6114/exx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/julio6114/exx/merges","archive_url":"https://api.github.com/repos/julio6114/exx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/julio6114/exx/downloads","issues_url":"https://api.github.com/repos/julio6114/exx/issues{/number}","pulls_url":"https://api.github.com/repos/julio6114/exx/pulls{/number}","milestones_url":"https://api.github.com/repos/julio6114/exx/milestones{/number}","notifications_url":"https://api.github.com/repos/julio6114/exx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/julio6114/exx/labels{/name}","releases_url":"https://api.github.com/repos/julio6114/exx/releases{/id}","deployments_url":"https://api.github.com/repos/julio6114/exx/deployments","created_at":"2016-01-26T15:10:11Z","updated_at":"2016-01-26T16:19:41Z","pushed_at":"2016-01-27T13:00:59Z","git_url":"git://github.com/julio6114/exx.git","ssh_url":"git@github.com:julio6114/exx.git","clone_url":"https://github.com/julio6114/exx.git","svn_url":"https://github.com/julio6114/exx","homepage":"","size":18,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"CaptainQuirk:master","ref":"master","sha":"e792bfbed2d946b59a4b740707b2bc1836ad4dd0","user":{"login":"CaptainQuirk","id":993420,"avatar_url":"https://avatars.githubusercontent.com/u/993420?v=3","gravatar_id":"","url":"https://api.github.com/users/CaptainQuirk","html_url":"https://github.com/CaptainQuirk","followers_url":"https://api.github.com/users/CaptainQuirk/followers","following_url":"https://api.github.com/users/CaptainQuirk/following{/other_user}","gists_url":"https://api.github.com/users/CaptainQuirk/gists{/gist_id}","starred_url":"https://api.github.com/users/CaptainQuirk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CaptainQuirk/subscriptions","organizations_url":"https://api.github.com/users/CaptainQuirk/orgs","repos_url":"https://api.github.com/users/CaptainQuirk/repos","events_url":"https://api.github.com/users/CaptainQuirk/events{/privacy}","received_events_url":"https://api.github.com/users/CaptainQuirk/received_events","type":"User","site_admin":false},"repo":{"id":50429430,"name":"exx","full_name":"CaptainQuirk/exx","owner":{"login":"CaptainQuirk","id":993420,"avatar_url":"https://avatars.githubusercontent.com/u/993420?v=3","gravatar_id":"","url":"https://api.github.com/users/CaptainQuirk","html_url":"https://github.com/CaptainQuirk","followers_url":"https://api.github.com/users/CaptainQuirk/followers","following_url":"https://api.github.com/users/CaptainQuirk/following{/other_user}","gists_url":"https://api.github.com/users/CaptainQuirk/gists{/gist_id}","starred_url":"https://api.github.com/users/CaptainQuirk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CaptainQuirk/subscriptions","organizations_url":"https://api.github.com/users/CaptainQuirk/orgs","repos_url":"https://api.github.com/users/CaptainQuirk/repos","events_url":"https://api.github.com/users/CaptainQuirk/events{/privacy}","received_events_url":"https://api.github.com/users/CaptainQuirk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CaptainQuirk/exx","description":"switch xcode version","fork":false,"url":"https://api.github.com/repos/CaptainQuirk/exx","forks_url":"https://api.github.com/repos/CaptainQuirk/exx/forks","keys_url":"https://api.github.com/repos/CaptainQuirk/exx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CaptainQuirk/exx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CaptainQuirk/exx/teams","hooks_url":"https://api.github.com/repos/CaptainQuirk/exx/hooks","issue_events_url":"https://api.github.com/repos/CaptainQuirk/exx/issues/events{/number}","events_url":"https://api.github.com/repos/CaptainQuirk/exx/events","assignees_url":"https://api.github.com/repos/CaptainQuirk/exx/assignees{/user}","branches_url":"https://api.github.com/repos/CaptainQuirk/exx/branches{/branch}","tags_url":"https://api.github.com/repos/CaptainQuirk/exx/tags","blobs_url":"https://api.github.com/repos/CaptainQuirk/exx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CaptainQuirk/exx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CaptainQuirk/exx/git/refs{/sha}","trees_url":"https://api.github.com/repos/CaptainQuirk/exx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CaptainQuirk/exx/statuses/{sha}","languages_url":"https://api.github.com/repos/CaptainQuirk/exx/languages","stargazers_url":"https://api.github.com/repos/CaptainQuirk/exx/stargazers","contributors_url":"https://api.github.com/repos/CaptainQuirk/exx/contributors","subscribers_url":"https://api.github.com/repos/CaptainQuirk/exx/subscribers","subscription_url":"https://api.github.com/repos/CaptainQuirk/exx/subscription","commits_url":"https://api.github.com/repos/CaptainQuirk/exx/commits{/sha}","git_commits_url":"https://api.github.com/repos/CaptainQuirk/exx/git/commits{/sha}","comments_url":"https://api.github.com/repos/CaptainQuirk/exx/comments{/number}","issue_comment_url":"https://api.github.com/repos/CaptainQuirk/exx/issues/comments{/number}","contents_url":"https://api.github.com/repos/CaptainQuirk/exx/contents/{+path}","compare_url":"https://api.github.com/repos/CaptainQuirk/exx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CaptainQuirk/exx/merges","archive_url":"https://api.github.com/repos/CaptainQuirk/exx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CaptainQuirk/exx/downloads","issues_url":"https://api.github.com/repos/CaptainQuirk/exx/issues{/number}","pulls_url":"https://api.github.com/repos/CaptainQuirk/exx/pulls{/number}","milestones_url":"https://api.github.com/repos/CaptainQuirk/exx/milestones{/number}","notifications_url":"https://api.github.com/repos/CaptainQuirk/exx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CaptainQuirk/exx/labels{/name}","releases_url":"https://api.github.com/repos/CaptainQuirk/exx/releases{/id}","deployments_url":"https://api.github.com/repos/CaptainQuirk/exx/deployments","created_at":"2016-01-26T13:12:23Z","updated_at":"2016-01-26T13:12:56Z","pushed_at":"2016-01-27T13:00:59Z","git_url":"git://github.com/CaptainQuirk/exx.git","ssh_url":"git@github.com:CaptainQuirk/exx.git","clone_url":"https://github.com/CaptainQuirk/exx.git","svn_url":"https://github.com/CaptainQuirk/exx","homepage":null,"size":10,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CaptainQuirk/exx/pulls/1"},"html":{"href":"https://github.com/CaptainQuirk/exx/pull/1"},"issue":{"href":"https://api.github.com/repos/CaptainQuirk/exx/issues/1"},"comments":{"href":"https://api.github.com/repos/CaptainQuirk/exx/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/CaptainQuirk/exx/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/CaptainQuirk/exx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CaptainQuirk/exx/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/CaptainQuirk/exx/statuses/036af76a4f7c45e7adc406a087c6497f23619127"}}}}