2022-11-21 09:27:39 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Elevate script
|
|
|
|
if [ ! "$UID" -eq 0 ]
|
|
|
|
then
|
2023-01-23 14:55:10 +00:00
|
|
|
sudo bash "$BASH_SOURCE";
|
2022-11-21 09:27:39 +00:00
|
|
|
else
|
2023-01-23 15:11:51 +00:00
|
|
|
contextRoot="$(mktemp -d)";
|
2023-03-16 19:14:49 +00:00
|
|
|
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 \
|
2023-01-23 14:55:10 +00:00
|
|
|
| bash;
|
2022-11-21 09:27:39 +00:00
|
|
|
|
2023-03-16 19:14:49 +00:00
|
|
|
popd > /dev/null;
|
2023-01-23 15:11:51 +00:00
|
|
|
rm -rf "$contextRoot";
|
2022-11-21 09:27:39 +00:00
|
|
|
|
|
|
|
{
|
2023-01-23 14:55:10 +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
|