diff options
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/check-shebang.sh | 15 | ||||
| -rwxr-xr-x | tools/create-gce-image.sh | 2 | ||||
| -rwxr-xr-x | tools/create-image.sh | 2 | ||||
| -rwxr-xr-x | tools/create-openbsd-gce-ci.sh | 2 | ||||
| -rwxr-xr-x | tools/create-openbsd-vmm-worker.sh | 2 | ||||
| -rwxr-xr-x | tools/demo_setup.sh | 2 | ||||
| -rwxr-xr-x | tools/fuzzit.sh | 2 |
7 files changed, 21 insertions, 6 deletions
diff --git a/tools/check-shebang.sh b/tools/check-shebang.sh new file mode 100755 index 000000000..a7c1e67dd --- /dev/null +++ b/tools/check-shebang.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# Copyright 2020 syzkaller project authors. All rights reserved. +# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +FAILED="" +FILES=0 +for F in $(find . -perm -u=x -type f | egrep -v "/vendor/|/gen/|/.git"); do + ((FILES+=1)) + if head -n 1 "$F" | egrep -q '^#!/' && head -n 1 "$F" | egrep -v -q -e '^#!/bin/sh$' -e '^#!/usr/bin/env '; then + echo "$F: Non-portable shebang line. Please use /usr/bin/env to locate the interpreter." + FAILED=1 + fi +done +[ -n "$FAILED" ] && exit 1 +echo "$FILES files checked for non-portable shebang lines" diff --git a/tools/create-gce-image.sh b/tools/create-gce-image.sh index 54eb56764..075143fcc 100755 --- a/tools/create-gce-image.sh +++ b/tools/create-gce-image.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2016 syzkaller project authors. All rights reserved. # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. diff --git a/tools/create-image.sh b/tools/create-image.sh index 5b92fd8f5..0a71efb7a 100755 --- a/tools/create-image.sh +++ b/tools/create-image.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2016 syzkaller project authors. All rights reserved. # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. diff --git a/tools/create-openbsd-gce-ci.sh b/tools/create-openbsd-gce-ci.sh index 60eb5ae00..5eb0a16a5 100755 --- a/tools/create-openbsd-gce-ci.sh +++ b/tools/create-openbsd-gce-ci.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2018 syzkaller project authors. All rights reserved. # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. diff --git a/tools/create-openbsd-vmm-worker.sh b/tools/create-openbsd-vmm-worker.sh index 1cc2b2dbc..60906881b 100755 --- a/tools/create-openbsd-vmm-worker.sh +++ b/tools/create-openbsd-vmm-worker.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2018 syzkaller project authors. All rights reserved. # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. diff --git a/tools/demo_setup.sh b/tools/demo_setup.sh index f93897d31..019dc49f0 100755 --- a/tools/demo_setup.sh +++ b/tools/demo_setup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2018 syzkaller project authors. All rights reserved. # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. diff --git a/tools/fuzzit.sh b/tools/fuzzit.sh index 780ce4db5..66dfa3224 100755 --- a/tools/fuzzit.sh +++ b/tools/fuzzit.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2019 syzkaller project authors. All rights reserved. # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. |
