forked from innovation-system/electron-kiosk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·37 lines (30 loc) · 873 Bytes
/
install.sh
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
echo '# Installing Electron KIOSK... '
cd ~
# Get arch
getUrl() {
ARCH=$(uname -m)
if [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then
grep "browser_download_url.*-arm64.AppImage"
else
grep "browser_download_url.*.AppImage" \
| grep -v "browser_download_url.*-arm64.AppImage"
fi
}
curl -s https://api.github.com/repos/innovation-system/electron-kiosk/releases/latest \
| getUrl \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -i -
FILE=$(ls | grep electron-kiosk*.AppImage)
# Create .desktop on ~/.config/autostart
mkdir -p ~/.config/autostart
echo "[Desktop Entry]
Type=Application
Name=Electron Kiosk
Exec=$(pwd)/$FILE
X-GNOME-Autostart-enabled=true
" > ~/.config/autostart/electron-kiosk.desktop
chmod +x $FILE
# create symlink to desktop
ln -sf $(pwd)/$FILE $(xdg-user-dir DESKTOP)/On-Board
echo '# Electron KIOSK installed and starting on BOOT'