2014-02-02 05:52:53 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
cd $(dirname $0)
|
|
|
|
|
|
|
|
SOURCE=$(pwd)/android
|
2014-02-02 17:55:33 -05:00
|
|
|
CONTAINER=cyanogenmod
|
|
|
|
REPOSITORY=stucki/cyanogenmod
|
2014-02-02 05:52:53 -05:00
|
|
|
|
2014-02-16 06:50:24 -05:00
|
|
|
# Create a shared folder which will be used as working directory.
|
2014-02-02 05:52:53 -05:00
|
|
|
test -d $SOURCE || mkdir $SOURCE
|
|
|
|
|
2014-02-16 06:50:24 -05:00
|
|
|
# Try to start an existing/stopped container with the given name $CONTAINER. Otherwise, run a new one.
|
2014-02-20 14:08:15 -05:00
|
|
|
docker start -i $CONTAINER 2>/dev/null || docker run -v $SOURCE:/home/cmbuild/android -i -t -name $CONTAINER $REPOSITORY sh -c "screen -s /bin/bash"
|
2014-02-02 05:52:53 -05:00
|
|
|
|
|
|
|
exit $?
|