From 1ec235ca00bfa4b25612d046cf3fa6c5daad8d35 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 9 Sep 2014 15:36:42 -0600 Subject: [PATCH] Add simple script to auto-update the hello-world description --- hello-world/update.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 hello-world/update.sh diff --git a/hello-world/update.sh b/hello-world/update.sh new file mode 100755 index 000000000..8e9cf5226 --- /dev/null +++ b/hello-world/update.sh @@ -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/^/ /'