command parameter

This commit is contained in:
Mike Aizatsky 2016-10-18 14:40:47 -07:00
parent b1b39adf11
commit 5c99eb3b7e
1 changed files with 17 additions and 4 deletions

21
all.sh
View File

@ -1,4 +1,4 @@
#!/bin/bash -eux #!/bin/bash -eu
# #
# Copyright 2016 Google Inc. # Copyright 2016 Google Inc.
# #
@ -17,12 +17,25 @@
################################################################################ ################################################################################
# Development script to build all images. # Development script to build all images.
./infra/base-images/all.sh
IGNORE="docs:infra:tpm2:scripts" IGNORE="docs:infra:tpm2:scripts"
# Build
./infra/base-images/all.sh
for project in *; do for project in *; do
if [[ -f $project || ":${IGNORE}:" == *":$project:"* ]]; then continue; fi if [[ -f $project || ":${IGNORE}:" == *":$project:"* ]]; then continue; fi
echo "@ Building $project"
docker build -t ossfuzz/$project $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 done