FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge pull request #4110 from gohai/arm-install-script · szigyi/processing@b50b77f · GitHub

Repository navigation

Commit b50b77f

Browse files
committed
Merge pull request processing#4110 from gohai/arm-install-script
Add installation script for ARM
2 parents 1ab9ba2 + 0d287dd commit b50b77f

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

‎build/linux/install-arm.sh‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/sh
2+
3+
# This script installs the latest version of Processing for ARM into /usr/local/lib
4+
# Run it like this: "curl http://sukzessiv.net/~gohai/p5-arm/install-arm.sh | sudo sh"
5+
6+
# this assumes that newer releases are at the top
7+
TAR="$(curl -sL https://api.github.com/repos/processing/processing/releases | grep -oh -m 1 'https.*linux-armv6hf.tgz')"
8+
9+
echo "\nDownloading $TAR..."
10+
curl -L $TAR > processing-linux-armv6hf-latest.tgz
11+
12+
echo "Installing in /usr/local..."
13+
tar fx processing-linux-armv6hf-latest.tgz -C /usr/local/lib
14+
rm -f processing-linux-armv6hf-latest.tgz
15+
16+
# this returns the highest version installed
17+
VER="$(basename $(ls -dvr /usr/local/lib/processing-* | head -1))"
18+
19+
# symlink target might be a directory, replace
20+
rm -rf /usr/local/lib/processing
21+
ln -s $VER /usr/local/lib/processing
22+
23+
# this assumes that /usr/local/bin is in $PATH
24+
ln -sf ../lib/processing/processing /usr/local/bin/processing
25+
ln -sf ../lib/processing/processing-java /usr/local/bin/processing-java
26+
27+
# this assumes that the desktop manager picks up .desktop files in /usr/local/share/applications
28+
mkdir -p /usr/local/share/applications
29+
curl -sL https://raw.githubusercontent.com/processing/processing/master/build/linux/processing.desktop > /usr/local/share/applications/processing.desktop
30+
sed -i "s/@version@/$VER/" /usr/local/share/applications/processing.desktop
31+
sed -i 's|/opt/processing|/usr/local/lib/processing|' /usr/local/share/applications/processing.desktop
32+
33+
# silence validation errors
34+
desktop-file-install /usr/local/share/applications/processing.desktop >/dev/null 2>&1
35+
36+
echo "Done! You can start processing by running \"processing\" in the terminal, or through the applications menu (might require a restart).\n"

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL