2016-07-01 21:52:19 +01:00
|
|
|
#!/bin/bash
|
2017-01-26 05:44:03 +00:00
|
|
|
set -e
|
|
|
|
|
|
|
|
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
|
|
|
|
export DONT_CHANGE_SHELL=true
|
|
|
|
./macosx/configure_fresh_system.sh
|
|
|
|
exit 0
|
|
|
|
fi
|
2016-07-01 21:52:19 +01:00
|
|
|
|
|
|
|
if [[ -z $DETECTED_OS ]]; then
|
|
|
|
echo "cannot detect OS, please set DETECTED_OS manually"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-08-04 14:36:04 +01:00
|
|
|
if [[ $DETECTED_OS =~ .*:.* ]]; then
|
2016-08-04 15:08:47 +01:00
|
|
|
SYSTEM_NAME=`echo $DETECTED_OS | cut -d':' -f1`
|
|
|
|
SYSTEM_VERSION=`echo $DETECTED_OS | cut -d':' -f2`
|
2016-08-04 14:36:04 +01:00
|
|
|
else
|
|
|
|
echo "please set DETECTED_OS to system:version"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-08-04 14:54:01 +01:00
|
|
|
INSIDER_ROOT_DIR=/root/temp/dotfiles/
|
|
|
|
CURRENT_DIR=`pwd`
|
|
|
|
|
2016-08-04 15:08:47 +01:00
|
|
|
SYSTEM_DIR="$SYSTEM_NAME/"
|
|
|
|
SYSTEM_VERSION_DIR="$SYSTEM_NAME/$SYSTEM_VERSION/"
|
|
|
|
|
|
|
|
if [[ -d "$CURRENT_DIR/$SYSTEM_VERSION_DIR" ]]; then
|
|
|
|
DIR=$SYSTEM_VERSION_DIR
|
|
|
|
else
|
|
|
|
DIR=$SYSTEM_DIR
|
2016-08-04 14:54:01 +01:00
|
|
|
fi
|
|
|
|
|
2016-09-19 19:16:14 +01:00
|
|
|
if [[ -z $DOCKER_IMAGE ]]; then
|
|
|
|
DOCKER_IMAGE="$DETECTED_OS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
docker run -v $CURRENT_DIR:$INSIDER_ROOT_DIR $DOCKER_IMAGE $INSIDER_ROOT_DIR/$DIR/test_insider
|
2016-07-01 21:52:19 +01:00
|
|
|
|