Skip to content

Commit 533bfb1

Browse files
authored
Add files via upload
1 parent 0d98f1d commit 533bfb1

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

get-dependencies.sh

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/bin/sh
2+
3+
set -eu
4+
ARCH="$(uname -m)"
5+
DEB_SOURCE="https://cursor.com/download"
6+
EXTRA_PACKAGES="https://raw.githubusercontent.com/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/get-debloated-pkgs.sh"
7+
8+
echo "Installing dependencies..."
9+
echo "---------------------------------------------------------------"
10+
pacman -Syu --noconfirm \
11+
base-devel \
12+
curl \
13+
git \
14+
inetutils \
15+
libx11 \
16+
libxrandr \
17+
libxss \
18+
pulseaudio \
19+
pulseaudio-alsa \
20+
pipewire-audio \
21+
wget \
22+
xorg-server-xvfb \
23+
zsync
24+
25+
echo "Installing debloated packages..."
26+
echo "---------------------------------------------------------------"
27+
wget --retry-connrefused --tries=30 "$EXTRA_PACKAGES" -O ./get-debloated-pkgs.sh
28+
chmod +x ./get-debloated-pkgs.sh
29+
./get-debloated-pkgs.sh --add-common --prefer-nano
30+
31+
echo "Getting Cursor..."
32+
echo "---------------------------------------------------------------"
33+
34+
case "$ARCH" in # they use AMD64 and ARM64 for the deb links
35+
x86_64) deb_arch=amd64
36+
aarch64) deb_arch=arm64
37+
esac
38+
39+
DEB_LINK=$(
40+
wget --retry-connrefused --tries=30 "$DEB_SOURCE" -O - \
41+
| sed 's/[()",{} ]/\n/g' \
42+
| grep -o "https.*linux.*$deb_arch.*deb" \
43+
| head -1
44+
)
45+
46+
wget --retry-connrefused --tries=30 "$DEB_LINK" -O /tmp/cursor.deb
47+
ar xvf /tmp/cursor.deb
48+
tar -xvf ./data.tar.xz
49+
rm -f ./*.xz
50+
mv -v ./usr ./AppDir
51+
mv -v ./AppDir/share/cursor ./AppDir/bin
52+
cp -v ./AppDir/share/applications/cursor.desktop ./AppDir
53+
cp -v ./AppDir/share/pixmaps/co.anysphere.cursor.png ./AppDir
54+
55+
echo "$DEB_LINK" | awk -F'_' '{print $(NF-1)}' > ~/version
56+

0 commit comments

Comments
 (0)