PortValhalla/scripts/PopOS/software/jetbrains-toolbox.sh

25 lines
635 B
Bash
Executable file

#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE"
else
workingDirectory=$(pwd)
contextRoot=$(mktemp -d)
cd $contextRoot
curl -fsSL https://raw.githubusercontent.com/nagygergo/jetbrains-toolbox-install/1.1/jetbrains-toolbox.sh \
| bash
cd $workingDirectory
rm -rf $contextRoot
{
echo "[Desktop Entry]"
echo "Encoding=UTF-8"
echo "Type=Application"
echo "Terminal=false"
echo "Exec=/opt/jetbrains-toolbox/jetbrains-toolbox"
echo "Name=JetBrains Toolbox"
} > /usr/share/applications/jetbrains-toolbox.desktop
fi