aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Kirø <magnuskiro@gmail.com>2016-02-29 19:46:56 +0100
committerMagnus Kirø <magnuskiro@gmail.com>2016-02-29 20:47:35 +0100
commitdb833dca13ddbc95e8e3a9514e94bf534d06e4db (patch)
tree69482df33efc743592986be149fe034656aaba61
parent9c2b70f2a07ca33417d1c07812c63cd9cc666c18 (diff)
tabs to spaces!
-rwxr-xr-xnms/makedockerfiles.sh30
1 files changed, 15 insertions, 15 deletions
diff --git a/nms/makedockerfiles.sh b/nms/makedockerfiles.sh
index 6c8e136..6c7e3da 100755
--- a/nms/makedockerfiles.sh
+++ b/nms/makedockerfiles.sh
@@ -1,26 +1,26 @@
#!/bin/sh
awk -v TARGET=/dev/null '
BEGIN {
- system("mkdir -p build")
+ system("mkdir -p build")
}
/^@template/ {
- TARGET="build/Dockerfile."$2;
- TARGETS[ntargets++]=$2;
- print "# Generated" > TARGET
- next;
+ TARGET="build/Dockerfile."$2;
+ TARGETS[ntargets++]=$2;
+ print "# Generated" > TARGET
+ next;
}
{
- print > TARGET
+ print > TARGET
}
END {
- print "#! /bin/sh" > "build/build.sh"
- print "set -e" > "build/build.sh"
- for (x in TARGETS) {
- a = TARGETS[x]
- print "echo Building "a > "build/build.sh"
- print "echo Logs: build/"a".log" > "build/build.sh"
- print "docker build -t "a" -f build/Dockerfile."a" . > build/"a".log 2>&1 || cat build/"a".log" > "build/build.sh"
- }
- system("chmod +x build/build.sh")
+ print "#! /bin/sh" > "build/build.sh"
+ print "set -e" > "build/build.sh"
+ for (x in TARGETS) {
+ a = TARGETS[x]
+ print "echo Building "a > "build/build.sh"
+ print "echo Logs: build/"a".log" > "build/build.sh"
+ print "docker build -t "a" -f build/Dockerfile."a" . > build/"a".log 2>&1 || cat build/"a".log" > "build/build.sh"
+ }
+ system("chmod +x build/build.sh")
}' < Dockerfile.in
build/build.sh