Update worker.sh

This commit is contained in:
probonopd authored and GitHub committed 2017-08-07 10:45:54 +02:00
1 parent 55add8b28e
commit ea6b5fd654
1 file changed
+8 -2
+8 -2
View File
@@ -3,11 +3,15 @@
URL=$(cat $1)
echo $URL
# TODO: Check if $URL starts with "http", otherwise exit
# Check if $URL starts with "http", otherwise exit
if [ ${URL:0:4} != http ] ; then
echo "No http link detected in $1"
exit 1
fi
# If $URL begins with https://api.github.com, then treat it specially
# This allows us to have generic URLs rather than URLs to specific releases
if [ ${URL:0:22} == https://api.github.com ] ; then
if [ ${URL:0:22} == https://api.github.com ] ; then
echo "GitHub API URL detected"
URL=$(wget -q "$URL" -O - | grep browser_download_url | grep -i AppImage | head -n 1 | cut -d '"' -f 4) # TODO: Handle more than one AppImage per release
echo "URL from GitHub API: $URL"
@@ -68,6 +72,8 @@ if [ $TYPE -eq 1 ] ; then
sudo umount -l /mnt
fi
# If everything succeeded until here, then download Firejail aith Xpra and run the application in it and take screenshots
# If everything succeeded until here, then put together a "database file" and display it
# If this is not a PR, then git add the "database file" and git commit with "[ci skip]" and git push