Browse Source

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

Tianon Gravi 11 years ago
parent
commit
1ec235ca00
1 changed files with 17 additions and 0 deletions
  1. 17 0
      hello-world/update.sh

+ 17 - 0
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/^/    /'