2016-07-01 21:52:19 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
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
|
|
|
|
DIR=`echo $DETECTED_OS | cut -d':' -f1`
|
|
|
|
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`
|
|
|
|
|
|
|
|
if [[ -d "$CURRENT_DIR/$DETECTED_OS" ]]; then
|
|
|
|
DIR=$DETECTED_OS
|
|
|
|
fi
|
|
|
|
|
|
|
|
docker run -v $CURRENT_DIR:$INSIDER_ROOT_DIR $DETECTED_OS $INSIDER_ROOT_DIR/$DIR/test_insider
|
2016-07-01 21:52:19 +01:00
|
|
|
|