From 9f672aa0a9a4fac2c09e6f912acb521905007483 Mon Sep 17 00:00:00 2001 From: Cyryl Plotnicki-Chudyk Date: Sun, 19 Jul 2015 11:06:13 +0200 Subject: [PATCH] split out installer for travis from the original ubuntu one --- .travis.yml | 2 +- travis/configure_fresh_system | 14 ++++++++++++++ ubuntu/configure_fresh_system | 16 ++++------------ 3 files changed, 19 insertions(+), 13 deletions(-) create mode 100755 travis/configure_fresh_system diff --git a/.travis.yml b/.travis.yml index 114e8312..5b053907 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,2 +1,2 @@ language: bash -script: ./ubuntu/configure_fresh_system +script: ./travis/configure_fresh_system diff --git a/travis/configure_fresh_system b/travis/configure_fresh_system new file mode 100755 index 00000000..be70f329 --- /dev/null +++ b/travis/configure_fresh_system @@ -0,0 +1,14 @@ +#!/bin/bash +# detect if building inside a CI system, like Travis +echo "choosing totally noninteractive installation method" +COMMAND_PREFIX="DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confnew\""; + +sudo apt-get update + +INSTALL_COMMAND="sudo $COMMAND_PREFIX install meld whois zsh tmux vim atop aria2 curl pv pixz gajim tor torsocks nodejs npm terminator gsmartcontrol python-pip mesa-utils mesa-utils-extra aptitude p7zip-full p7zip-rar thunderbird mercurial kdiff3 gnupg2 python3-setuptools" +eval ${INSTALL_COMMAND} + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +DIR="$DIR/../" +DIR="$DIR" $DIR/common/configure_fresh_system + diff --git a/ubuntu/configure_fresh_system b/ubuntu/configure_fresh_system index 2d8281c3..f5d28c8d 100755 --- a/ubuntu/configure_fresh_system +++ b/ubuntu/configure_fresh_system @@ -1,21 +1,13 @@ #!/bin/bash # detect if building inside a CI system, like Travis -if [ -z ${IN_CI+x} ]; then - echo "choosing the more interactive installation method" - COMMAND_PREFIX="apt-get -y"; -else - echo "choosing totally noninteractive installation method" - COMMAND_PREFIX="DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confnew\""; -fi +echo "choosing the more interactive installation method" +COMMAND_PREFIX="apt-get -y"; set -e sudo apt-get update -if [ -z ${IN_CI+x} ]; then - echo "upgrading whole system, as not in CI" - UPGRADE_COMMAND="sudo $COMMAND_PREFIX dist-upgrade" - eval ${UPGRADE_COMMAND} -fi +UPGRADE_COMMAND="sudo $COMMAND_PREFIX dist-upgrade" +eval ${UPGRADE_COMMAND} INSTALL_COMMAND="sudo $COMMAND_PREFIX install meld whois zsh tmux vim atop aria2 curl pv pixz gajim tor torsocks nodejs npm terminator gsmartcontrol python-pip mesa-utils mesa-utils-extra aptitude p7zip-full p7zip-rar thunderbird mercurial kdiff3 gnupg2 python3-setuptools aircrack-ng macchanger" eval ${INSTALL_COMMAND}