{"action":"created","issue":{"url":"https://api.github.com/repos/satya164/fedy/issues/157","labels_url":"https://api.github.com/repos/satya164/fedy/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/satya164/fedy/issues/157/comments","events_url":"https://api.github.com/repos/satya164/fedy/issues/157/events","html_url":"https://github.com/satya164/fedy/issues/157","id":71799687,"number":157,"title":"Better way of getting latest Brackets.","user":{"login":"fa7ad","id":7447677,"avatar_url":"https://avatars.githubusercontent.com/u/7447677?v=3","gravatar_id":"","url":"https://api.github.com/users/fa7ad","html_url":"https://github.com/fa7ad","followers_url":"https://api.github.com/users/fa7ad/followers","following_url":"https://api.github.com/users/fa7ad/following{/other_user}","gists_url":"https://api.github.com/users/fa7ad/gists{/gist_id}","starred_url":"https://api.github.com/users/fa7ad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fa7ad/subscriptions","organizations_url":"https://api.github.com/users/fa7ad/orgs","repos_url":"https://api.github.com/users/fa7ad/repos","events_url":"https://api.github.com/users/fa7ad/events{/privacy}","received_events_url":"https://api.github.com/users/fa7ad/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-29T07:21:50Z","updated_at":"2015-05-04T20:12:14Z","closed_at":"2015-05-03T20:56:02Z","body":"First we need #147 to be installed.\r\nAnd to get the latest brackets, look to GitHub's releases API\r\nHere's my current code snippet, most of it is ripped off of your script. \r\nchange the standard commands back to fedy's format and maybe you can add this on master?\r\n```bash\r\n#!/bin/bash\r\necho \"Removing old versions\"\r\nyum erase brackets -y\r\nrm -rf /opt/brackets\r\necho \"Getting latest version\"\r\nmkdir /tmp/brackets\r\ncd /tmp/brackets\r\nwget \"https://api.github.com/repos/adobe/brackets/releases/latest\" -O \"brackets.json\"\r\nget=$(cat \"brackets.json\" | grep \"64-bit.deb\" | tail -n 1 | cut -d\\\" -f 4)\r\nfile=${get##*/}\r\nwget \"$get\" -O \"$file\"\r\nif [[ -f \"$file\" ]]; then\r\n    echo \"Installing deps\"\r\n    yum install atk ca-certificates cairo cups dbus expat fontconfig freetype gcc GConf2 gdk-pixbuf2 glib2 gtk2 libcurl libgcrypt libstdc++ libX11 libXcomposite libXdamage libXext libXfixes libXrandr libXrender nspr nss pango redhat-lsb wget xdg-utils -y\r\n    echo \"Installing files\"\r\n    mkdir -p \"${file%.*}\"\r\n    ar p \"$file\" \"data.tar.xz\" | tar -C \"${file%.*}\" -xJf -\r\n    cp -af \"${file%.*}/opt/brackets\" \"/opt/\"\r\n    cp -af \"${file%.*}/usr/bin/brackets\" \"/usr/bin/\"\r\n    cp -af \"${file%.*}/usr/share/doc/brackets\" \"/usr/share/doc/\"\r\n    cp -af \"${file%.*}/usr/share/menu/brackets.menu\" \"/usr/share/menu/\"\r\n    cp -af \"${file%.*}/usr/share/icons/hicolor/scalable/apps/brackets.svg\" \"/usr/share/icons/hicolor/scalable/apps/\"\r\n    for icon in /opt/brackets/appshell*.png; do\r\n        size=\"${icon##*/appshell}\"\r\n        xdg-icon-resource install --novendor --size \"${size%.png}\" \"$icon\" \"brackets\"\r\n    done\r\n    gtk-update-icon-cache -f -t /usr/share/icons/hicolor > /dev/null 2>&1\r\n    xdg-desktop-menu install --novendor /opt/brackets/brackets.desktop\r\n    if [[ \"$arch\" = \"32\" ]]; then\r\n        libdir=\"/usr/lib\"\r\n    elif [[ \"$arch\" = \"64\" ]]; then\r\n        libdir=\"/usr/lib64\"\r\n    fi\r\n    nss_files=\"libnspr4.so.0d libplds4.so.0d libplc4.so.0d libssl3.so.1d libnss3.so.1d libsmime3.so.1d libnssutil3.so.1d\"\r\n    for f in $nss_files; do\r\n        target=$(echo $f | sed 's/\\.[01]d$//')\r\n        if [[ -f \"$libdir/$target\" ]]; then\r\n            ln -snf \"$libdir/$target\" \"/opt/brackets/$f\"\r\n        else\r\n            show_err \"$f not found in $libdir/$target\"\r\n        fi\r\n    done\r\n    [[ -f $libdir/libudev.so.1 ]] && ln -snf $libdir/libudev.so.1 $libdir/libudev.so.0\r\nelse\r\n    echo \"Failed! File doesn't exist\"\r\nfi\r\necho \"Cleaning Up!\"\r\nrm -rf /tmp/brackets\r\n```"},"comment":{"url":"https://api.github.com/repos/satya164/fedy/issues/comments/98835823","html_url":"https://github.com/satya164/fedy/issues/157#issuecomment-98835823","issue_url":"https://api.github.com/repos/satya164/fedy/issues/157","id":98835823,"user":{"login":"fa7ad","id":7447677,"avatar_url":"https://avatars.githubusercontent.com/u/7447677?v=3","gravatar_id":"","url":"https://api.github.com/users/fa7ad","html_url":"https://github.com/fa7ad","followers_url":"https://api.github.com/users/fa7ad/followers","following_url":"https://api.github.com/users/fa7ad/following{/other_user}","gists_url":"https://api.github.com/users/fa7ad/gists{/gist_id}","starred_url":"https://api.github.com/users/fa7ad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fa7ad/subscriptions","organizations_url":"https://api.github.com/users/fa7ad/orgs","repos_url":"https://api.github.com/users/fa7ad/repos","events_url":"https://api.github.com/users/fa7ad/events{/privacy}","received_events_url":"https://api.github.com/users/fa7ad/received_events","type":"User","site_admin":false},"created_at":"2015-05-04T20:12:14Z","updated_at":"2015-05-04T20:12:14Z","body":"Sure, I don't see why not... if he keeps maintaining the copr.\r\nMaybe you can use some kinda logic for using the git as a fallback. Say if the copr release and the git latest release vary by a x.**X**.x, then pull from the git otherwise use copr."}}