Discord now uses compiled version

pull/39/head
Botspot 5 years ago committed by GitHub
parent 3c7c17d3bd
commit 3f0d27e442
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -7,18 +7,37 @@ function error {
exit 1 exit 1
} }
git clone https://github.com/SpacingBat3/electron-discord-webapp || error "Failed to download repo!" arch=''
while [ "$arch" != 'armhf' ] && [ "$arch" != 'arm64' ]
if [ ! -f /usr/bin/npm ];then do
echo "npm is not installed. Installing npm now..." echo -n "Which type of Discord do you want? [armhf/arm64] "
"${DIRECTORY}/pkg-install" "npm" "$(dirname "$0")" || exit 1 arch=''
echo "Updating npm to latest version..." read arch
sudo npm install -g npm || error "failed to update npm to latest version!" if [ "$arch" != 'armhf' ] && [ "$arch" != 'arm64' ];then
echo -e "\\e[91mDid not understand '$arch'. Try again.\\e[39m"
fi
done
#maker and enter discord-electron folder
gio trash ~/discord-electron
mkdir ~/discord-electron
cd ~/discord-electron || error "Failed to enter discord-electron folder!"
if [ "$arch" == 'armhf' ];then
#Download from github
wget https://github.com/SpacingBat3/electron-discord-webapp/releases/download/v0.1.1/linux-armv7l.tar.gz || error 'Failed to download archive!'
tar -xf linux-armv7l.tar.gz --strip 1 || error 'Failed to extract archive!'
rm -f linux-armv7l.tar.gz
elif [ "$arch" == 'arm64' ];then
#Download from github
wget https://github.com/SpacingBat3/electron-discord-webapp/releases/download/v0.1.1/linux-aarch64.tar.gz || error 'Failed to download archive!'
tar -xf linux-aarch64.tar.gz --strip 1 || error 'Failed to extract archive!'
rm -f linux-aarch64.tar.gz
fi fi
cd electron-discord-webapp cd $HOME
npm install
#Create desktop shortcut #Create desktop shortcut
echo "[Desktop Entry] echo "[Desktop Entry]
@ -26,11 +45,10 @@ StartupNotify=true
Terminal=false Terminal=false
Type=Application Type=Application
Name=Discord Name=Discord
Path=$HOME/electron-discord-webapp Path=$HOME/discord-electron
Exec=npm start Exec=$HOME/discord-electron/discord
Icon=/home/pi/pi-apps/apps/Discord/icon-64.png Icon=/home/pi/pi-apps/apps/Discord/icon-64.png
Categories=Network;Chat;VideoConference;WebApp;Internet Categories=Network;Chat;VideoConference;WebApp;Internet
Comment=Your place to talk! Comment=Your place to talk!
GenericName=Network Messenger" > ~/.local/share/applications/discord.desktop GenericName=Network Messenger" > ~/.local/share/applications/discord.desktop

Loading…
Cancel
Save