From 5c99eb3b7e8e9891a3ea25165dd34a47381272c4 Mon Sep 17 00:00:00 2001 From: Mike Aizatsky Date: Tue, 18 Oct 2016 14:40:47 -0700 Subject: [PATCH] command parameter --- all.sh | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/all.sh b/all.sh index de2026c8b..a0c9236cd 100755 --- a/all.sh +++ b/all.sh @@ -1,4 +1,4 @@ -#!/bin/bash -eux +#!/bin/bash -eu # # Copyright 2016 Google Inc. # @@ -17,12 +17,25 @@ ################################################################################ # Development script to build all images. - -./infra/base-images/all.sh - IGNORE="docs:infra:tpm2:scripts" +# Build +./infra/base-images/all.sh for project in *; do if [[ -f $project || ":${IGNORE}:" == *":$project:"* ]]; then continue; fi + echo "@ Building $project" docker build -t ossfuzz/$project $project/ + + # Execute command ($1) if any + case ${1-} in + "") + ;; + compile) + docker run --rm -ti ossfuzz/$project $@ + ;; + *) + echo $"Usage: $0 {|compile}" + exit 1 + esac + done