-
Notifications
You must be signed in to change notification settings - Fork 205
/
install
executable file
·42 lines (37 loc) · 2.18 KB
/
install
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
#!/bin/bash
version=v1.0.4
case "$arch" in
"64") wget https://github.com/Orama-Interactive/Pixelorama/releases/download/${version}/Pixelorama-Linux-ARM64.tar.gz -O /tmp/pixelorama.tar.gz || error "Could not download Pixelorama archive" ;;
"32") wget https://github.com/Orama-Interactive/Pixelorama/releases/download/${version}/Pixelorama-Linux-ARM32.tar.gz -O /tmp/pixelorama.tar.gz || error "Could not download Pixelorama archive" ;;
*) error "Failed to detect OS CPU architecture! Something is very wrong." ;;
esac
sudo rm -rf /usr/share/Pixelorama /usr/share/applications/com.orama_interactive.Pixelorama.desktop /usr/bin/pixelorama
sudo tar -xvf /tmp/pixelorama.tar.gz -C /tmp/
case "$arch" in
"64") sudo mv /tmp/Pixelorama-Linux-ARM64/ /usr/share/Pixelorama/ || error "Could not install Pixelorama" ;;
"32") sudo mv /tmp/Pixelorama-Linux-ARM32/ /usr/share/Pixelorama/ || error "Could not install Pixelorama" ;;
*) error "Failed to detect OS CPU architecture! Something is very wrong." ;;
esac
rm -f /tmp/pixelorama.tar.gz
case "$arch" in
"64") sudo ln -s /usr/share/Pixelorama/Pixelorama.arm64 /usr/bin/pixelorama || error "Could not create symbolic link" ;;
"32") sudo ln -s /usr/share/Pixelorama/Pixelorama.arm32 /usr/bin/pixelorama || error "Could not create symbolic link" ;;
*) error "Failed to detect OS CPU architecture! Something is very wrong." ;;
esac
echo "[Desktop Entry]
Name=Pixelorama
GenericName=2D sprite editor
GenericName[el]=Επεξεργαστής δισδιάστατων εικόνων
GenericName[fr]=Éditeur de sprites 2D
GenericName[pt_BR]=Editor de sprites 2D
GenericName[zh_CN]=2D 精灵编辑器
Comment=Create and edit static or animated 2D sprites
Comment[el]=Δημιουργήστε και επεξεργαστείτε στατικές ή κινούμενες δισδιάστατες εικόνες
Comment[fr]=Créez et modifiez des sprites 2D statiques ou animées
Comment[pt_BR]=Crie e edite sprites 2D estáticos ou animados
Comment[zh_CN]=创建并编辑 2D 精灵图片或动画
Exec=pixelorama
Icon=$(dirname "$0")/icon-64.png
Terminal=false
Type=Application
Categories=Graphics;2DGraphics;RasterGraphics;" | sudo tee /usr/share/applications/com.orama_interactive.Pixelorama.desktop