diff --git a/test b/test index 3ca2a066..10466feb 100755 --- a/test +++ b/test @@ -6,7 +6,8 @@ if [[ -z $DETECTED_OS ]]; then fi if [[ $DETECTED_OS =~ .*:.* ]]; then - DIR=`echo $DETECTED_OS | cut -d':' -f1` + SYSTEM_NAME=`echo $DETECTED_OS | cut -d':' -f1` + SYSTEM_VERSION=`echo $DETECTED_OS | cut -d':' -f2` else echo "please set DETECTED_OS to system:version" exit 1 @@ -15,8 +16,13 @@ fi INSIDER_ROOT_DIR=/root/temp/dotfiles/ CURRENT_DIR=`pwd` -if [[ -d "$CURRENT_DIR/$DETECTED_OS" ]]; then - DIR=$DETECTED_OS +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 fi docker run -v $CURRENT_DIR:$INSIDER_ROOT_DIR $DETECTED_OS $INSIDER_ROOT_DIR/$DIR/test_insider diff --git a/ubuntu:trusty/configure_fresh_system b/ubuntu/trusty/configure_fresh_system similarity index 98% rename from ubuntu:trusty/configure_fresh_system rename to ubuntu/trusty/configure_fresh_system index 4941514f..60841244 100755 --- a/ubuntu:trusty/configure_fresh_system +++ b/ubuntu/trusty/configure_fresh_system @@ -21,5 +21,5 @@ if [[ -z $NO_SYSTEMCTL ]]; then fi DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -DIR="$DIR/../" +DIR="$DIR/../../" DIR="$DIR" $DIR/common/configure_fresh_system diff --git a/ubuntu/trusty/test_insider b/ubuntu/trusty/test_insider new file mode 100755 index 00000000..acfe5d01 --- /dev/null +++ b/ubuntu/trusty/test_insider @@ -0,0 +1,19 @@ +#!/bin/bash + +set -e + +export DEBIAN_FRONTEND=noninteractive +export DONT_CHANGE_SHELL=true +export NO_SYSTEMCTL=true + +echo "APT::Acquire::Retries=16;" >> /etc/apt/apt.conf.d/99_retries + +apt-get update +apt-get install sudo +cd $HOME + +mkdir -p dev/ +cp -rv temp/dotfiles dev/ + +./dev/dotfiles/ubuntu/trusty/configure_fresh_system +