PortValhalla/scripts/Common/Software/JetBrains/install-toolbox.sh

25 lines
637 B
Bash
Raw Normal View History

2022-11-21 09:27:39 +00:00
#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE";
2022-11-21 09:27:39 +00:00
else
2023-01-23 15:11:51 +00:00
contextRoot="$(mktemp -d)";
pushd "$contextRoot" > /dev/null;
2022-11-21 09:27:39 +00:00
curl -fsSL https://raw.githubusercontent.com/nagygergo/jetbrains-toolbox-install/1.1/jetbrains-toolbox.sh \
| bash;
2022-11-21 09:27:39 +00:00
popd > /dev/null;
2023-01-23 15:11:51 +00:00
rm -rf "$contextRoot";
2022-11-21 09:27:39 +00:00
{
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;
2022-11-21 09:27:39 +00:00
fi