#!/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 } rm -f ~/turbowarp.deb wget -O ~/turbowarp.deb https://github.com/TurboWarp/desktop/releases/download/v0.8.0/TurboWarp-linux-armv7l-0.8.0.deb || error "Failed to download deb!" sudo apt install -yf ~/turbowarp.deb || error "Failed to install turbowarp.deb!" rm -f ~/turbowarp.deb echo -n "Moving menu launcher from Education to Programming category... " sudo sed -i 's/Categories=Education;/Categories=Application;Development;/g' /usr/share/applications/turbowarp-desktop.desktop sudo sed -i 's/%U/%f%U/g' /usr/share/applications/turbowarp-desktop.desktop echo done #create scratch project mime type echo -n "Creating .sb3 mimetype... " sudo bash -c 'echo " Scratch 3 Project " > /usr/share/mime/packages/sb3.xml' sudo update-mime-database /usr/share/mime echo done if [ -z "$(cat ~/.config/mimeapps.list | grep 'turbowarp-desktop.desktop')" ];then echo -n "Associating the .sb3 mimetype with TurboWarp... " echo "[Added Associations] application/sb3=turbowarp-desktop.desktop;" >> ~/.config/mimeapps.list echo done fi