You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
494 B

#!/bin/sh
set -e -u
CONTAINER=termux-package-builder
IMAGE=termux/package-builder
docker pull $IMAGE
LATEST=$(docker inspect --format "{{.Id}}" $IMAGE)
RUNNING=$(docker inspect --format "{{.Image}}" $CONTAINER)
if [ $LATEST = $RUNNING ]; then
echo "Image '$IMAGE' used in the container '$CONTAINER' is already up to date"
else
echo "Image '$IMAGE' used in the container '$CONTAINER' has been updated - removing the outdated container"
docker stop $CONTAINER
docker rm -f $CONTAINER
fi