[sdocker] use AOSP_IMAGE for root src
This commit is contained in:
parent
005f51d944
commit
027ae8d29b
@ -166,6 +166,7 @@ apush() {
|
|||||||
|
|
||||||
sdocker (){
|
sdocker (){
|
||||||
DOCKER_SSH_AUTH=$HOME/docker_ssh_auth
|
DOCKER_SSH_AUTH=$HOME/docker_ssh_auth
|
||||||
|
AOSP_IMAGE=${AOSP_IMAGE:-$HOME/Project}
|
||||||
if [ -n "$SSH_AUTH_SOCK" ]; then
|
if [ -n "$SSH_AUTH_SOCK" ]; then
|
||||||
$(ls -l $HOME/docker_ssh_auth 2> /dev/null | grep $SSH_AUTH_SOCK > /dev/null)
|
$(ls -l $HOME/docker_ssh_auth 2> /dev/null | grep $SSH_AUTH_SOCK > /dev/null)
|
||||||
if [ $? ];
|
if [ $? ];
|
||||||
@ -181,7 +182,7 @@ sdocker (){
|
|||||||
img=$(docker ps -a | grep $1 | awk '{print $1}') | head -1;
|
img=$(docker ps -a | grep $1 | awk '{print $1}') | head -1;
|
||||||
if [ -z $img ]; then
|
if [ -z $img ]; then
|
||||||
echo "Running a new container"
|
echo "Running a new container"
|
||||||
docker run ${AOSP_ARGS} ${=SSH_AUTH_ARGS} -v /home/mmaret/Project:/aosp/Project $1
|
docker run ${AOSP_ARGS} ${=SSH_AUTH_ARGS} -v ${AOSP_IMAGE}:/aosp/Project $1
|
||||||
else
|
else
|
||||||
echo "Starting $img"
|
echo "Starting $img"
|
||||||
docker start -i -a $img
|
docker start -i -a $img
|
||||||
|
Loading…
Reference in New Issue
Block a user