-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathget-dependencies.sh
More file actions
38 lines (31 loc) · 1.29 KB
/
get-dependencies.sh
File metadata and controls
38 lines (31 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
set -eu
ARCH=$(uname -m)
echo "Installing package dependencies..."
echo "---------------------------------------------------------------"
pacman -Syu --noconfirm \
libdecor \
sdl3
echo "Installing debloated packages..."
echo "---------------------------------------------------------------"
get-debloated-pkgs --add-common --prefer-nano
# Comment this out if you need an AUR package
#make-aur-package PACKAGENAME
# If the application needs to be manually built that has to be done down here
echo "Getting app..."
echo "---------------------------------------------------------------"
case "$ARCH" in # they use x64 and arm64 for the zip links
x86_64) farch=x64;;
aarch64) farch=arm64;;
esac
ZIP_LINK=$(wget https://api.github.com/repos/drhelius/Geargrafx/releases -O - \
| sed 's/[()",{} ]/\n/g' | grep -o -m 1 "https.*ubuntu24.04-$farch.zip")
echo "$ZIP_LINK" | awk -F'/' '{gsub(/^v/, "", $(NF-1)); print $(NF-1); exit}' > ~/version
if ! wget --retry-connrefused --tries=30 "$ZIP_LINK" -O /tmp/app.zip 2>/tmp/download.log; then
cat /tmp/download.log
exit 1
fi
mkdir -p ./AppDir/bin
bsdtar -xvf /tmp/app.zip -C ./AppDir/bin
rm -f ./AppDir/bin/README.txt
wget -O ./AppDir/bin/gamecontrollerdb.txt https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/master/gamecontrollerdb.txt