Skip to content

Commit

Permalink
[teamviewer] Add installation.
Browse files Browse the repository at this point in the history
  • Loading branch information
130s committed Jun 19, 2016
1 parent 0b4a4b3 commit 8aca67e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions install_ubuntu_common.bash
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,19 @@ function install_docker() {
return $RESULT
}

function test_teamviewer_install() {
teamviewer --help && return 0 || return 1
}

function install_teamviewer() {
INSTALL_TARGET_TOOL=${1:-teamviewer}
INSTALLER_DL_URL=http://download.teamviewer.com/download/teamviewer_i386.deb
INSTALLER_TMPNAME=teamviewer_i386.deb
TEMPDIR_INSTALLWORK=/tmp/install_`date +%N` && mkdir $TEMPDIR_INSTALLWORK
wget $INSTALLER_DL_URL -O $TEMPDIR_INSTALLWORK/$INSTALLER_TMPNAME || error $LINENO "Failed to download from URL: ${INSTALLER_DL_URL}. Skipping ${INSTALL_TARGET_TOOL) installation." -1
cd $TEMPDIR_INSTALLWORK && sudo dpkg -i $INSTALLER_TMPNAME || error $LINENO "Failed to install. Skipping ${INSTALL_TARGET_TOOL} installation." -1
}
# Need to test https://github.com/130s/compenv_ubuntu/issues/3
function test_display_env() {
#TODO
Expand All @@ -160,6 +173,8 @@ function _test_systems() {
if [ ! -z $MSG_ENDROLL ]; then printf $MSG_ENDROLL; else echo "Script ends."; fi
test_display_env
test_teamviewer_install
}
# command line parse
Expand Down Expand Up @@ -266,5 +281,7 @@ tmux_setup
# DL and put Eclipse binary in PATH
install_eclipse
install_teamviewer
# Test some commands to check installation
_test_systems

0 comments on commit 8aca67e

Please sign in to comment.