From 83a0c0a3dc0d0fd5e1682383cc20e34d64616da7 Mon Sep 17 00:00:00 2001 From: Phantop Date: Fri, 18 Mar 2022 13:02:14 -0400 Subject: [PATCH] apps: add github fetch script --- apps/appimage | 5 +---- apps/github | 7 +++++++ apps/ungoogled | 3 +++ 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100755 apps/github create mode 100755 apps/ungoogled diff --git a/apps/appimage b/apps/appimage index 9769f67..ef47cc9 100755 --- a/apps/appimage +++ b/apps/appimage @@ -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 diff --git a/apps/github b/apps/github new file mode 100755 index 0000000..2490d37 --- /dev/null +++ b/apps/github @@ -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" diff --git a/apps/ungoogled b/apps/ungoogled new file mode 100755 index 0000000..cf1f462 --- /dev/null +++ b/apps/ungoogled @@ -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"