diff --git a/_home/private_dot_local/bin/executable_launch-teamviewer-quicksupport.sh b/_home/private_dot_local/bin/executable_launch-teamviewer-quicksupport.sh new file mode 100644 index 0000000..fd67af8 --- /dev/null +++ b/_home/private_dot_local/bin/executable_launch-teamviewer-quicksupport.sh @@ -0,0 +1,38 @@ +#! /usr/bin/env bash + +### based on the code shared at https://community.teamviewer.com/English/discussion/comment/116988/#Comment_116988 + +clear +cat </dev/null | awk '{ print $1 }') +RemoteSize=$(curl -sI "$RemoteFile" | awk -v IGNORECASE=1 '/^Content-Length/ {sub("\r",""); print $2}') +if [ "$LocalSize" != "$RemoteSize" ]; then + echo "Downloading file into $LocalFile..." + curl -Lo "$LocalFile" "$RemoteFile" +else + echo "$LocalFile exists and is same size as on server, using existing file..." +fi + +rm -fR /tmp/tvqs 2>&1 > /dev/null +mkdir -p /tmp/tvqs +pushd /tmp/tvqs > /dev/null +tar xzf "$LocalFile" +cd teamviewerqs +echo "Launching TeamViewer Quick Support from $PWD, it should startup in a few seconds..." +./teamviewer & +popd +