-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathget-dependencies.sh
More file actions
43 lines (35 loc) · 1.39 KB
/
get-dependencies.sh
File metadata and controls
43 lines (35 loc) · 1.39 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
39
40
41
42
43
#!/bin/sh
set -eu
ARCH=$(uname -m)
echo "Installing package dependencies..."
echo "---------------------------------------------------------------"
pacman -Syu --noconfirm \
pipewire-audio \
pipewire-jack
echo "Installing debloated packages..."
echo "---------------------------------------------------------------"
get-debloated-pkgs --add-common --prefer-nano
# Comment this out if you need an AUR package
#make-aur-package
# If the application needs to be manually built that has to be done down here
echo "Getting app..."
echo "---------------------------------------------------------------"
case "$ARCH" in # they use AMD64 and ARM64 for the deb links
x86_64) deb_arch=amd64;;
aarch64) deb_arch=arm64;;
esac
DEB_LINK=$(wget https://api.github.com/repos/FreeTubeApp/FreeTube/releases -O - \
| sed 's/[()",{} ]/\n/g' | grep -o -m 1 "https.*$deb_arch.deb")
echo "$DEB_LINK" | awk -F'/' '{gsub(/^v/, "", $(NF-1)); print $(NF-1); exit}' > ~/version
if ! wget --retry-connrefused --tries=30 "$DEB_LINK" -O /tmp/app.deb 2>/tmp/download.log; then
cat /tmp/download.log
exit 1
fi
mkdir -p ./AppDir/bin
ar xvf /tmp/app.deb
tar -xvf ./data.tar.xz
rm -f ./*.xz
rm -rf ./usr/share/doc
mv -v ./opt/FreeTube/* ./AppDir/bin
cp ./usr/share/icons/hicolor/scalable/apps/freetube.svg ./AppDir/.DirIcon
mv -v ./usr/share/icons/hicolor/scalable/apps/freetube.svg ./usr/share/applications/freetube.desktop ./AppDir