{"action":"created","comment":{"url":"https://api.github.com/repos/Foggalong/hardcode-fixer/pulls/comments/30974250","id":30974250,"diff_hunk":"@@ -10,195 +10,243 @@\n # a copy of the GNU General Public License along with this program.\n # If not, see <http://www.gnu.org/licenses/>.\n \n-# Version info\n-date=201503130  # [year][month][date][extra]\n+# Version information\n+\n+date=201505240  # [year][month][date][extra]\n+\n+# Global variables\n+\n+script=$(basename -- \"$0\")\n+user=\"${SUDO_USER:-$USER}\"\n+\n+# Resource locations\n \n-# Locations\n git_locate=\"https://raw.githubusercontent.com/Foggalong/hardcode-fixer/master\"\n-local_apps=\"/home/${SUDO_USER:-$USER}/.local/share/applications/\"\n-local_icon=\"/home/${SUDO_USER:-$USER}/.local/share/icons/hicolor/48x48/apps/\"\n+local_apps=\"/home/$user/.local/share/applications/\"\n+local_icon=\"/home/$user/.local/share/icons/hicolor/48x48/apps/\"\n global_apps=\"/usr/share/applications/\"\n global_icon=\"/usr/share/icons/hicolor/48x48/apps/\"\n steam_icon=\"${global_icon}steam.png\"\n \n # Allows timeout when launched via 'Run in Terminal'\n-function gerror() { sleep 3; exit 1; }\n \n-# Deals with the flags\n-if [ -z \"$1\" ]; then\n-    mode=\"fix\"\n-else\n-    case $1 in\n-        -l|--local)\n-            mode=\"local\";;\n-        -r|--revert)\n-            echo \"This will undo all changes previously made.\"\n-            while true; do\n-                read -p \"Are you sure you want to continue? \" answer\n-                case $answer in\n-                    [Yy]* ) mode=\"revert\"; break;;\n-                    [Nn]* ) exit;;\n-                    * ) echo \"Please answer [Y/y]es or [N/n]o.\";;\n-                esac\n-            done;;\n-        -h|--help)\n-            echo -e \\\n-                \"Usage: ./$(basename -- $0) [OPTION]\\n\" \\\n-                \"\\rFixes hardcoded icons of installed applications.\\n\\n\" \\\n-                \"\\rCurrently supported options:\\n\" \\\n-                \"\\r  -l, --local \\t Only fixes local launchers.\\n\" \\\n-                \"\\r  -r, --revert \\t Reverts any changes made.\\n\" \\\n-                \"\\r  -h, --help \\t\\t Displays this help menu.\\n\" \\\n-                \"\\r  -v, --version \\t Displays program version.\\n\"\n-            exit 0 ;;\n-        -v|--version)\n-            echo -e \"$(basename -- $0) $date\\n\"\n-            exit 0 ;;\n-        *)\n-            echo -e \"$(basename -- $0): invalid option -- '$1'\"\n-            echo -e \"Try '$(basename -- $0) --help' for more information.\"\n-            gerror\n-    esac\n-fi\n+get_error() {","path":"fix.sh","position":66,"original_position":66,"commit_id":"960e9a17d3470e46c93e49afac82503a04efd896","original_commit_id":"960e9a17d3470e46c93e49afac82503a04efd896","user":{"login":"Foggalong","id":5920259,"avatar_url":"https://avatars.githubusercontent.com/u/5920259?v=3","gravatar_id":"","url":"https://api.github.com/users/Foggalong","html_url":"https://github.com/Foggalong","followers_url":"https://api.github.com/users/Foggalong/followers","following_url":"https://api.github.com/users/Foggalong/following{/other_user}","gists_url":"https://api.github.com/users/Foggalong/gists{/gist_id}","starred_url":"https://api.github.com/users/Foggalong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Foggalong/subscriptions","organizations_url":"https://api.github.com/users/Foggalong/orgs","repos_url":"https://api.github.com/users/Foggalong/repos","events_url":"https://api.github.com/users/Foggalong/events{/privacy}","received_events_url":"https://api.github.com/users/Foggalong/received_events","type":"User","site_admin":false},"body":"`gerror` stood for `general_error, not `get_error`. I'm not sure what the purpose of renaming is it though?","created_at":"2015-05-25T10:54:27Z","updated_at":"2015-05-25T10:54:27Z","html_url":"https://github.com/Foggalong/hardcode-fixer/pull/100#discussion_r30974250","pull_request_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/pulls/100","_links":{"self":{"href":"https://api.github.com/repos/Foggalong/hardcode-fixer/pulls/comments/30974250"},"html":{"href":"https://github.com/Foggalong/hardcode-fixer/pull/100#discussion_r30974250"},"pull_request":{"href":"https://api.github.com/repos/Foggalong/hardcode-fixer/pulls/100"}}},"pull_request":{"url":"https://api.github.com/repos/Foggalong/hardcode-fixer/pulls/100","id":36115667,"html_url":"https://github.com/Foggalong/hardcode-fixer/pull/100","diff_url":"https://github.com/Foggalong/hardcode-fixer/pull/100.diff","patch_url":"https://github.com/Foggalong/hardcode-fixer/pull/100.patch","issue_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/issues/100","number":100,"state":"open","locked":false,"title":"updates and additons","user":{"login":"nathaneltitane","id":5674757,"avatar_url":"https://avatars.githubusercontent.com/u/5674757?v=3","gravatar_id":"","url":"https://api.github.com/users/nathaneltitane","html_url":"https://github.com/nathaneltitane","followers_url":"https://api.github.com/users/nathaneltitane/followers","following_url":"https://api.github.com/users/nathaneltitane/following{/other_user}","gists_url":"https://api.github.com/users/nathaneltitane/gists{/gist_id}","starred_url":"https://api.github.com/users/nathaneltitane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathaneltitane/subscriptions","organizations_url":"https://api.github.com/users/nathaneltitane/orgs","repos_url":"https://api.github.com/users/nathaneltitane/repos","events_url":"https://api.github.com/users/nathaneltitane/events{/privacy}","received_events_url":"https://api.github.com/users/nathaneltitane/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-25T04:00:04Z","updated_at":"2015-05-25T10:54:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a3d61a75132ec0c766fec12178ee34eff35f283a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/pulls/100/commits","review_comments_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/pulls/100/comments","review_comment_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/issues/100/comments","statuses_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/statuses/960e9a17d3470e46c93e49afac82503a04efd896","head":{"label":"nathaneltitane:master","ref":"master","sha":"960e9a17d3470e46c93e49afac82503a04efd896","user":{"login":"nathaneltitane","id":5674757,"avatar_url":"https://avatars.githubusercontent.com/u/5674757?v=3","gravatar_id":"","url":"https://api.github.com/users/nathaneltitane","html_url":"https://github.com/nathaneltitane","followers_url":"https://api.github.com/users/nathaneltitane/followers","following_url":"https://api.github.com/users/nathaneltitane/following{/other_user}","gists_url":"https://api.github.com/users/nathaneltitane/gists{/gist_id}","starred_url":"https://api.github.com/users/nathaneltitane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathaneltitane/subscriptions","organizations_url":"https://api.github.com/users/nathaneltitane/orgs","repos_url":"https://api.github.com/users/nathaneltitane/repos","events_url":"https://api.github.com/users/nathaneltitane/events{/privacy}","received_events_url":"https://api.github.com/users/nathaneltitane/received_events","type":"User","site_admin":false},"repo":{"id":36208159,"name":"hardcode-fixer","full_name":"nathaneltitane/hardcode-fixer","owner":{"login":"nathaneltitane","id":5674757,"avatar_url":"https://avatars.githubusercontent.com/u/5674757?v=3","gravatar_id":"","url":"https://api.github.com/users/nathaneltitane","html_url":"https://github.com/nathaneltitane","followers_url":"https://api.github.com/users/nathaneltitane/followers","following_url":"https://api.github.com/users/nathaneltitane/following{/other_user}","gists_url":"https://api.github.com/users/nathaneltitane/gists{/gist_id}","starred_url":"https://api.github.com/users/nathaneltitane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathaneltitane/subscriptions","organizations_url":"https://api.github.com/users/nathaneltitane/orgs","repos_url":"https://api.github.com/users/nathaneltitane/repos","events_url":"https://api.github.com/users/nathaneltitane/events{/privacy}","received_events_url":"https://api.github.com/users/nathaneltitane/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nathaneltitane/hardcode-fixer","description":"Fixes Hardcoded Icons","fork":true,"url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer","forks_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/forks","keys_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/teams","hooks_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/hooks","issue_events_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/issues/events{/number}","events_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/events","assignees_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/assignees{/user}","branches_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/branches{/branch}","tags_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/tags","blobs_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/git/refs{/sha}","trees_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/statuses/{sha}","languages_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/languages","stargazers_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/stargazers","contributors_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/contributors","subscribers_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/subscribers","subscription_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/subscription","commits_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/commits{/sha}","git_commits_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/git/commits{/sha}","comments_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/comments{/number}","issue_comment_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/issues/comments{/number}","contents_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/contents/{+path}","compare_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/merges","archive_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/downloads","issues_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/issues{/number}","pulls_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/pulls{/number}","milestones_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/milestones{/number}","notifications_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/labels{/name}","releases_url":"https://api.github.com/repos/nathaneltitane/hardcode-fixer/releases{/id}","created_at":"2015-05-25T03:42:53Z","updated_at":"2015-05-25T03:42:53Z","pushed_at":"2015-05-25T03:58:38Z","git_url":"git://github.com/nathaneltitane/hardcode-fixer.git","ssh_url":"git@github.com:nathaneltitane/hardcode-fixer.git","clone_url":"https://github.com/nathaneltitane/hardcode-fixer.git","svn_url":"https://github.com/nathaneltitane/hardcode-fixer","homepage":null,"size":1612,"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":"Foggalong:master","ref":"master","sha":"c3148533c48c79ae40f207400db26b0cfa8edd7b","user":{"login":"Foggalong","id":5920259,"avatar_url":"https://avatars.githubusercontent.com/u/5920259?v=3","gravatar_id":"","url":"https://api.github.com/users/Foggalong","html_url":"https://github.com/Foggalong","followers_url":"https://api.github.com/users/Foggalong/followers","following_url":"https://api.github.com/users/Foggalong/following{/other_user}","gists_url":"https://api.github.com/users/Foggalong/gists{/gist_id}","starred_url":"https://api.github.com/users/Foggalong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Foggalong/subscriptions","organizations_url":"https://api.github.com/users/Foggalong/orgs","repos_url":"https://api.github.com/users/Foggalong/repos","events_url":"https://api.github.com/users/Foggalong/events{/privacy}","received_events_url":"https://api.github.com/users/Foggalong/received_events","type":"User","site_admin":false},"repo":{"id":18926922,"name":"hardcode-fixer","full_name":"Foggalong/hardcode-fixer","owner":{"login":"Foggalong","id":5920259,"avatar_url":"https://avatars.githubusercontent.com/u/5920259?v=3","gravatar_id":"","url":"https://api.github.com/users/Foggalong","html_url":"https://github.com/Foggalong","followers_url":"https://api.github.com/users/Foggalong/followers","following_url":"https://api.github.com/users/Foggalong/following{/other_user}","gists_url":"https://api.github.com/users/Foggalong/gists{/gist_id}","starred_url":"https://api.github.com/users/Foggalong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Foggalong/subscriptions","organizations_url":"https://api.github.com/users/Foggalong/orgs","repos_url":"https://api.github.com/users/Foggalong/repos","events_url":"https://api.github.com/users/Foggalong/events{/privacy}","received_events_url":"https://api.github.com/users/Foggalong/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Foggalong/hardcode-fixer","description":"Fixes Hardcoded Icons","fork":false,"url":"https://api.github.com/repos/Foggalong/hardcode-fixer","forks_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/forks","keys_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/teams","hooks_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/hooks","issue_events_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/issues/events{/number}","events_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/events","assignees_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/assignees{/user}","branches_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/branches{/branch}","tags_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/tags","blobs_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/git/refs{/sha}","trees_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/statuses/{sha}","languages_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/languages","stargazers_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/stargazers","contributors_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/contributors","subscribers_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/subscribers","subscription_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/subscription","commits_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/commits{/sha}","git_commits_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/git/commits{/sha}","comments_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/comments{/number}","issue_comment_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/issues/comments{/number}","contents_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/contents/{+path}","compare_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/merges","archive_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/downloads","issues_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/issues{/number}","pulls_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/pulls{/number}","milestones_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/milestones{/number}","notifications_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/labels{/name}","releases_url":"https://api.github.com/repos/Foggalong/hardcode-fixer/releases{/id}","created_at":"2014-04-18T21:59:41Z","updated_at":"2015-05-15T22:55:27Z","pushed_at":"2015-05-25T04:00:04Z","git_url":"git://github.com/Foggalong/hardcode-fixer.git","ssh_url":"git@github.com:Foggalong/hardcode-fixer.git","clone_url":"https://github.com/Foggalong/hardcode-fixer.git","svn_url":"https://github.com/Foggalong/hardcode-fixer","homepage":null,"size":1612,"stargazers_count":28,"watchers_count":28,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":2,"forks":12,"open_issues":2,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Foggalong/hardcode-fixer/pulls/100"},"html":{"href":"https://github.com/Foggalong/hardcode-fixer/pull/100"},"issue":{"href":"https://api.github.com/repos/Foggalong/hardcode-fixer/issues/100"},"comments":{"href":"https://api.github.com/repos/Foggalong/hardcode-fixer/issues/100/comments"},"review_comments":{"href":"https://api.github.com/repos/Foggalong/hardcode-fixer/pulls/100/comments"},"review_comment":{"href":"https://api.github.com/repos/Foggalong/hardcode-fixer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Foggalong/hardcode-fixer/pulls/100/commits"},"statuses":{"href":"https://api.github.com/repos/Foggalong/hardcode-fixer/statuses/960e9a17d3470e46c93e49afac82503a04efd896"}}}}