Update worker.sh

This commit is contained in:
probonopd authored and GitHub committed 2017-08-16 19:10:49 +02:00
1 parent ddc5ae3742
commit e5fa061c13
1 file changed
+3 -3
+3 -3
View File
@@ -17,10 +17,10 @@ fi
# If the URL begins with https://github.com, then treat it specially
# https://github.com/egoist/devdocs-desktop/
if [ ${URL:0:17} == https://github.com ] ; then
if [ ${URL:0:18} == https://github.com ] ; then
echo "GitHub URL detected"
GHUSER=$(echo $URL | cut -d '/' -f 4)
GHREPO=$(echo $URL | cut -d '/' -f 5)
GHUSER=$(echo "$URL" | cut -d '/' -f 4)
GHREPO=$(echo "$URL" | cut -d '/' -f 5)
URL="https://api.github.com/repos/$GHUSER/$GHREPO/releases/latest"
echo "URL from GitHub: $URL"
fi