Something went wrong. Try again.
Mirroring: https://github.com/MunifTanjim/scripts.sh
Something went wrong. Try again.
scripts.sh setup-robo3t
1.3 kB · 45 lines
at main
12345678910111213141516171819202122232425262728293031323334353637383940414243444546#!/usr/bin/env bash
cd /tmp || exit
echo "Installing Robo 3T..."_robo3t_url=`curl -s https://api.github.com/repos/Studio3T/robomongo/releases/latest | grep -o "http.*tar.gz"`_robo3t_dir="/opt/Robo3T"
_robo3t_icon_url="https://github.com/Studio3T/robomongo/raw/master/src/robomongo/gui/resources/icons/logo-256x256.png"
_robo3t_archive_filename=`basename ${_robo3t_url}`_robo3t_archive_directory=${_robo3t_archive_filename%.tar.gz}
echo "Downloading Source Archive..."wget -q --show-progress ${_robo3t_url} -O robo3t.tar.gzecho "Unpacking Source Archive..."tar -xzf robo3t.tar.gzecho "Removing Source Archive..."rm robo3t.tar.gz
echo "Installation Directory: ${_robo3t_dir}"if [[ -d "${_robo3t_dir}" ]]; then sudo rm -rf ${_robo3t_dir}fisudo mv ${_robo3t_archive_directory} ${_robo3t_dir}
echo "Setting up Robo 3T binary: robo3t"sudo ln -nsf ${_robo3t_dir}/bin/robo3t /usr/bin/robo3t
echo "Getting Robo3T Icon..."wget -q --show-progress ${_robo3t_icon_url} -O ${_robo3t_dir}/bin/logo.png
echo "Adding Application Shortcut..."cat > ${HOME}/.local/share/applications/robo3t.desktop <<EOL[Desktop Entry]Encoding=UTF-8Name=Robo 3TExec=robo3tIcon=${_robo3t_dir}/bin/logo.pngTerminal=falseType=ApplicationCategories=Development;EOL
echo "Done!"