Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Installer script to turn Organizr instance into an Electron app
- echo "#########################"
- echo "Checking for dependencies"
- echo "#########################"
- echo ""
- if ! [ -x "$(command -v nodejs)" ]; then
- echo "#################"
- echo "Installing nodejs"
- echo "#################"
- echo ""
- sudo apt update
- sudo apt install nodejs
- else
- echo "########################"
- echo "Nodejs already installed"
- echo "########################"
- echo ""
- fi
- if ! [ -x "$(command -v npm)" ]; then
- echo "##############"
- echo "Installing npm"
- echo "##############"
- echo ""
- sudo apt update
- sudo apt install npm
- else
- echo "#####################"
- echo "Npm already installed"
- echo "#####################"
- echo ""
- fi
- echo "#####################"
- echo "Installing nativefier"
- echo "#####################"
- echo ""
- sudo npm install nativefier -g
- read -p "Enter the name you want to use for the app: " name
- name=$(echo "$name" | tr '[:upper:]' '[:lower:]')
- read -p "Enter the link to your Organizr instance (e.g. https://domain.com): " link
- echo ""
- if ! [ -d "/home/$USER/.organizr" ]; then
- mkdir /home/$USER/.organizr
- fi
- cd /home/$USER/.organizr
- nativefier --name "$name" "$link"
- echo "#####################"
- echo "Launching Organizr..."
- echo "#####################"
- echo ""
- echo "Organizr has beeninstalled to ~/.organizr"
- cd *
- ./"$name"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement