apps: add github fetch script

This commit is contained in:
Phantop 2022-03-18 13:02:14 -04:00
parent e65013ca39
commit 83a0c0a3dc
3 changed files with 11 additions and 4 deletions

View File

@ -1,5 +1,2 @@
#!/bin/bash
LINK1=https://raw.githubusercontent.com/AppImage/appimage.github.io/master/apps/$1.md
LINK2="$(curl "$LINK1" | grep -o https.\*releases | sed 's|github.com|api.github.com/repos|')"
LINK3="$(curl "$LINK2" | grep -v arm64 | grep -om1 https.\*AppImage)"
appdwarf -u "$LINK3"
./github https://raw.githubusercontent.com/AppImage/appimage.github.io/master/apps/$1.md

7
apps/github Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
if ! grep https <<< "$1"; then
set -- "https://github.com/$1"
fi
LINK2="$(curl "$1" | grep -o https.\*releases | sed 's|github.com|api.github.com/repos|')"
LINK3="$(curl "$LINK2" | grep -v arm64 | grep -om1 https.\*AppImage)"
appdwarf "${@:2}" -u "$LINK3"

3
apps/ungoogled Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
ID="$(curl -L https://ungoogled-software.github.io/ungoogled-chromium-binaries | grep -m7 href | tail -n 1 | awk -F'[<>]' '{print $5}')"
appdwarf -s -u "https://github.com/clickot/ungoogled-chromium-binaries/releases/download/99.0.4844.51-1.1/ungoogled-chromium_$ID.AppImage"