|
@@ -11,14 +11,15 @@
|
|
mkdir -p $SRC/{output,userpatches}
|
|
mkdir -p $SRC/{output,userpatches}
|
|
grep -q '^docker:' /etc/group && chgrp --quiet docker $SRC/{output,userpatches}
|
|
grep -q '^docker:' /etc/group && chgrp --quiet docker $SRC/{output,userpatches}
|
|
chmod --quiet g+w,g+s $SRC/{output,userpatches}
|
|
chmod --quiet g+w,g+s $SRC/{output,userpatches}
|
|
-VERSION=$(cat $SRC/VERSION)
|
|
|
|
-if grep -q $VERSION <(grep armbian <(docker images)); then
|
|
|
|
- display_alert "Using existed a armbian Docker container"
|
|
|
|
|
|
+VERSION=latest
|
|
|
|
+
|
|
|
|
+if grep -q $VERSION <(grep orangepi <(docker images)); then
|
|
|
|
+ display_alert "Using existed a orangepi Docker container"
|
|
else
|
|
else
|
|
# build a new container based on provided Dockerfile
|
|
# build a new container based on provided Dockerfile
|
|
display_alert "Docker container not found or out of date"
|
|
display_alert "Docker container not found or out of date"
|
|
display_alert "Building a Docker container"
|
|
display_alert "Building a Docker container"
|
|
- if ! docker build -t armbian:$VERSION . ; then
|
|
|
|
|
|
+ if ! docker build -t orangepi:$VERSION . ; then
|
|
STATUS=$?
|
|
STATUS=$?
|
|
# Adding a newline, so the alert won't be shown in the same line as the error
|
|
# Adding a newline, so the alert won't be shown in the same line as the error
|
|
echo
|
|
echo
|
|
@@ -77,10 +78,10 @@ fi
|
|
#DOCKER_FLAGS+=(-v /dev/bus/usb:/dev/bus/usb:ro)
|
|
#DOCKER_FLAGS+=(-v /dev/bus/usb:/dev/bus/usb:ro)
|
|
|
|
|
|
# map source to Docker Working dir.
|
|
# map source to Docker Working dir.
|
|
-DOCKER_FLAGS+=(-v=$SRC/:/root/armbian/)
|
|
|
|
|
|
+DOCKER_FLAGS+=(-v=$SRC/:/root/orangepi/)
|
|
|
|
|
|
# mount 2 named volumes - for cacheable data and compiler cache
|
|
# mount 2 named volumes - for cacheable data and compiler cache
|
|
-DOCKER_FLAGS+=(-v=armbian-cache:/root/armbian/cache -v=armbian-ccache:/root/.ccache)
|
|
|
|
|
|
+DOCKER_FLAGS+=(-v=orangepi-cache:/root/orangepi/cache -v=orangepi-ccache:/root/.ccache)
|
|
|
|
|
|
DOCKER_FLAGS+=(-e COLUMNS="`tput cols`" -e LINES="`tput lines`")
|
|
DOCKER_FLAGS+=(-e COLUMNS="`tput cols`" -e LINES="`tput lines`")
|
|
|
|
|
|
@@ -106,10 +107,10 @@ If you prefer to use profile, for example, `userpatches/config-my.conf`, try:
|
|
./compile.sh my compile_uboot
|
|
./compile.sh my compile_uboot
|
|
|
|
|
|
EOF
|
|
EOF
|
|
- docker run "${DOCKER_FLAGS[@]}" -it --entrypoint /usr/bin/env armbian:$VERSION "$@" /bin/bash
|
|
|
|
|
|
+ docker run "${DOCKER_FLAGS[@]}" -it --entrypoint /usr/bin/env orangepi:$VERSION "$@" /bin/bash
|
|
else
|
|
else
|
|
display_alert "Running the container" "" "info"
|
|
display_alert "Running the container" "" "info"
|
|
- docker run "${DOCKER_FLAGS[@]}" -it armbian:$VERSION "$@"
|
|
|
|
|
|
+ docker run "${DOCKER_FLAGS[@]}" -it orangepi:$VERSION "$@"
|
|
fi
|
|
fi
|
|
|
|
|
|
# Docker error treatment
|
|
# Docker error treatment
|