You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Botspot-Pi-Apps/apps/StackEdit/install-32

28 lines
903 B
Bash

#!/bin/bash
DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")"
function error {
echo -e "\\e[91m$1\\e[39m"
exit 1
}
cd $HOME
echo "Downloading..."
wget https://github.com/Itai-Nelken/Nativefier-WebApps/releases/download/v3.0/StackEdit-linux-armv7l.tar.xz || error 'Failed to Download!'
echo "extracting..."
tar -xf StackEdit-linux-armv7l.tar.xz || error "Failed to extract!"
echo "Renaming folder..."
mv ~/StackEdit-linux-armv7l ~/stackedit || error "Failed to rename folder!"
echo "Creating menu shortcut..."
echo "[Desktop Entry]
StartupNotify=true
Terminal=false
Type=Application
Name=StackEdit
Exec="$HOME/stackedit/StackEdit"
Path="$HOME/stackedit"
Icon="$HOME/pi-apps/apps/StackEdit/icon-64.png"
Categories=Development;IDE;" > ~/.local/share/applications/stackedit.desktop || error "Failed to create menu shortcut!"
rm -f StackEdit-linux-armv7l.tar.xz