Add simple script to auto-update the hello-world description

This commit is contained in:
Tianon Gravi 2014-09-09 15:36:42 -06:00
parent d66991fa97
commit 1ec235ca00
1 changed files with 17 additions and 0 deletions

17
hello-world/update.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
set -e
docker pull hello-world &> /dev/null
exec > "$(dirname "$(readlink -f "$BASH_SOURCE")")/README-content.md"
echo '# Example output'
echo
{
echo '$ docker run hello-world'
docker run --rm hello-world
echo
echo '$ docker images hello-world'
docker images hello-world | awk -F' +' '{ print $1"\t"$2"\t"$3"\t"$5 }' | column -t -s$'\t'
} | sed 's/^/ /'