Skip to content

Commit

Permalink
Clean Shell Scripts (google#999)
Browse files Browse the repository at this point in the history
* Clean all.sh

Double quote array expansions, otherwise they're like $* and break on spaces.

* Clean dropbear/build.sh

In POSIX sh, 'pushd' is not supported.
In POSIX sh, 'popd' is not supported.

* Clean woff2/build.sh

Iterating over ls output is fragile. Use globs.

* Clean tinyxml2/build.sh

Add shebang
  • Loading branch information
Androbin authored and tmatth committed Oct 22, 2018
1 parent 1d12bfd commit 113db3b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions infra/base-images/all.sh
Expand Up @@ -15,8 +15,8 @@
#
################################################################################

docker build --pull -t gcr.io/oss-fuzz-base/base-image $@ infra/base-images/base-image
docker build -t gcr.io/oss-fuzz-base/base-clang $@ infra/base-images/base-clang
docker build -t gcr.io/oss-fuzz-base/base-builder -t gcr.io/oss-fuzz/base-libfuzzer $@ infra/base-images/base-builder
docker build -t gcr.io/oss-fuzz-base/base-runner $@ infra/base-images/base-runner
docker build -t gcr.io/oss-fuzz-base/base-runner-debug $@ infra/base-images/base-runner-debug
docker build --pull -t gcr.io/oss-fuzz-base/base-image "$@" infra/base-images/base-image
docker build -t gcr.io/oss-fuzz-base/base-clang "$@" infra/base-images/base-clang
docker build -t gcr.io/oss-fuzz-base/base-builder -t gcr.io/oss-fuzz/base-libfuzzer "$@" infra/base-images/base-builder
docker build -t gcr.io/oss-fuzz-base/base-runner "$@" infra/base-images/base-runner
docker build -t gcr.io/oss-fuzz-base/base-runner-debug "$@" infra/base-images/base-runner-debug
2 changes: 1 addition & 1 deletion projects/dropbear/build.sh
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 1 addition & 0 deletions projects/tinyxml2/build.sh
@@ -1,3 +1,4 @@
#!/bin/bash
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion projects/woff2/build.sh
Expand Up @@ -27,7 +27,7 @@ make -j$(nproc) CC="$CC $CFLAGS" CXX="$CXX $CXXFLAGS" CANONICAL_PREFIXES= all \
NOISY_LOGGING=

# Build fuzzers
for fuzzer_archive in $(ls src/*fuzzer*.a); do
for fuzzer_archive in src/*fuzzer*.a; do
fuzzer_name=$(basename ${fuzzer_archive%.a})
$CXX $CXXFLAGS -lFuzzingEngine $fuzzer_archive \
-o $OUT/$fuzzer_name
Expand Down

0 comments on commit 113db3b

Please sign in to comment.