-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathget-dependencies.sh
More file actions
54 lines (45 loc) · 1.51 KB
/
get-dependencies.sh
File metadata and controls
54 lines (45 loc) · 1.51 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
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
set -eu
ARCH=$(uname -m)
echo "Installing dependencies..."
echo "---------------------------------------------------------------"
pacman -Syu --noconfirm \
base-devel \
inetutils \
libx11 \
libxrandr \
libxss \
nss \
pulseaudio \
pulseaudio-alsa \
pipewire-audio
if [ "$ARCH" = 'x86_64' ]; then
pacman -Syu --noconfirm libva-intel-driver
fi
echo "Installing debloated packages..."
echo "---------------------------------------------------------------"
get-debloated-pkgs --add-common --prefer-nano ffmpeg-mini intel-media-driver-mini
echo "Getting Cursor..."
echo "---------------------------------------------------------------"
DEB_SOURCE="https://cursor.com/download"
case "$ARCH" in # they use AMD64 and ARM64 for the deb links
x86_64) deb_arch=x64;;
aarch64) deb_arch=arm64;;
esac
DEB_LINK=$(wget --retry-connrefused --tries=30 "$DEB_SOURCE" -O - \
| sed 's/[()",{} ]/\n/g' \
| grep "https.*download.*linux.*$deb_arch.*deb" \
| head -1
)
if ! wget --retry-connrefused --tries=30 "$DEB_LINK" -O /tmp/cursor.deb 2>/tmp/download.log; then
cat /tmp/download.log
exit 1
fi
ar xvf /tmp/cursor.deb
tar -xvf ./data.tar.xz
rm -f ./*.xz
mv -v ./usr ./AppDir
mv -v ./AppDir/share/cursor ./AppDir/bin
cp -v ./AppDir/share/applications/cursor.desktop ./AppDir
cp -v ./AppDir/share/pixmaps/co.anysphere.cursor.png ./AppDir
awk -F'_' '/Location:/{print $(NF-1)}' /tmp/download.log > ~/version