Advertisement
Guest User

Organizr nativefier installer

a guest
Jun 19th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.39 KB | None | 0 0
  1. #!/bin/bash
  2. # Installer script to turn Organizr instance into an Electron app
  3.  
  4. echo "#########################"
  5. echo "Checking for dependencies"
  6. echo "#########################"
  7. echo ""
  8.  
  9. if ! [ -x "$(command -v nodejs)" ]; then
  10.     echo "#################"
  11.     echo "Installing nodejs"
  12.     echo "#################"
  13.     echo ""
  14.     sudo apt update
  15.     sudo apt install nodejs
  16. else
  17.     echo "########################"
  18.     echo "Nodejs already installed"
  19.     echo "########################"
  20.     echo ""
  21. fi
  22.  
  23. if ! [ -x "$(command -v npm)" ]; then
  24.     echo "##############"
  25.     echo "Installing npm"
  26.     echo "##############"
  27.     echo ""
  28.     sudo apt update
  29.     sudo apt install npm
  30. else
  31.     echo "#####################"
  32.     echo "Npm already installed"
  33.     echo "#####################"
  34.     echo ""
  35. fi
  36.  
  37. echo "#####################"
  38. echo "Installing nativefier"
  39. echo "#####################"
  40. echo ""
  41. sudo npm install nativefier -g
  42.  
  43. read -p "Enter the name you want to use for the app: " name
  44. name=$(echo "$name" | tr '[:upper:]' '[:lower:]')
  45.  
  46. read -p "Enter the link to your Organizr instance (e.g. https://domain.com): " link
  47. echo ""
  48.  
  49. if ! [ -d "/home/$USER/.organizr" ]; then
  50.     mkdir /home/$USER/.organizr
  51. fi
  52.  
  53. cd /home/$USER/.organizr
  54.  
  55. nativefier --name "$name" "$link"
  56.  
  57. echo "#####################"
  58. echo "Launching Organizr..."
  59. echo "#####################"
  60. echo ""
  61. echo "Organizr has beeninstalled to ~/.organizr"
  62.  
  63. cd *
  64. ./"$name"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement