aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnkush Patel2026-02-17 20:11:19 +1300
committerAnkush Patel2026-02-17 20:15:53 +1300
commit3a5675480b1ac35c938a4776240b16c20ec134ff (patch)
treeeab9331694c76103e1d3b6aa844e6e66afeff38c
parent8d8fb15f0b3680add1f3b28c062b573a92221ab0 (diff)
Freebsd-support: Change bash shebang to use /usr/bin/env
-rwxr-xr-xDocumentation/MANPAGE-render.bash2
-rwxr-xr-xbenchmark-reverse.bash4
-rwxr-xr-xbenchmark.bash4
-rwxr-xr-xbuild-without-openssl.bash4
-rwxr-xr-xbuild.bash4
-rwxr-xr-xcontrib/gocryptfs-maybe.bash2
-rwxr-xr-xcontrib/maxlen.bash2
-rwxr-xr-xinternal/siv_aead/benchmark.bash2
-rwxr-xr-xinternal/speed/benchmark.bash2
-rwxr-xr-xinternal/stupidgcm/benchmark.bash2
-rwxr-xr-xpackage-release-tarballs.bash2
-rwxr-xr-xprofiling/ls.bash4
-rwxr-xr-xprofiling/streaming-read.bash4
-rwxr-xr-xprofiling/streaming-write.bash4
-rwxr-xr-xprofiling/tar-extract.bash4
-rwxr-xr-xprofiling/write-trace.bash4
-rwxr-xr-xtest-without-openssl.bash4
-rwxr-xr-xtest.bash2
-rwxr-xr-xtests/canonical-benchmarks.bash3
-rwxr-xr-xtests/dl-linux-tarball.bash4
-rwxr-xr-xtests/fuse-unmount.bash5
-rwxr-xr-xtests/reverse/linux-tarball-test.bash2
-rwxr-xr-xtests/sshfs-benchmark.bash2
-rwxr-xr-xtests/stress_tests/extractloop.bash2
-rwxr-xr-xtests/stress_tests/fsstress-gocryptfs.bash2
-rwxr-xr-xtests/stress_tests/pingpong.bash2
26 files changed, 52 insertions, 26 deletions
diff --git a/Documentation/MANPAGE-render.bash b/Documentation/MANPAGE-render.bash
index c141c1e..2f19355 100755
--- a/Documentation/MANPAGE-render.bash
+++ b/Documentation/MANPAGE-render.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -eu
cd "$(dirname "$0")"
diff --git a/benchmark-reverse.bash b/benchmark-reverse.bash
index fad6bfe..ca3bc9b 100755
--- a/benchmark-reverse.bash
+++ b/benchmark-reverse.bash
@@ -1,7 +1,9 @@
-#!/bin/bash -eu
+#!/usr/bin/env bash
# Benchmark gocryptfs' reverse mode
+set -eu
+
cd "$(dirname "$0")"
MYNAME=$(basename "$0")
source tests/fuse-unmount.bash
diff --git a/benchmark.bash b/benchmark.bash
index fb99c65..f3d8a20 100755
--- a/benchmark.bash
+++ b/benchmark.bash
@@ -1,8 +1,10 @@
-#!/bin/bash -eu
+#!/usr/bin/env bash
# Run the set of "canonical" benchmarks that are shown on
# https://nuetzlich.net/gocryptfs/comparison/
+set -eu
+
cd "$(dirname "$0")"
MYNAME=$(basename "$0")
source tests/fuse-unmount.bash
diff --git a/build-without-openssl.bash b/build-without-openssl.bash
index c09e7f3..388f823 100755
--- a/build-without-openssl.bash
+++ b/build-without-openssl.bash
@@ -1,4 +1,6 @@
-#!/bin/bash -eu
+#!/usr/bin/env bash
+
+set -eu
cd "$(dirname "$0")"
diff --git a/build.bash b/build.bash
index 5e95c3e..e78188e 100755
--- a/build.bash
+++ b/build.bash
@@ -1,4 +1,4 @@
-#!/bin/bash -eu
+#!/usr/bin/env bash
#
# Compile gocryptfs and bake the git version string of itself and the go-fuse
# library into the binary.
@@ -10,6 +10,8 @@
# SOURCE_DATE_EPOCH=1544192417 ./build.bash
# .
+set -eu
+
cd "$(dirname "$0")"
# $0 does not work because we may have been sourced
diff --git a/contrib/gocryptfs-maybe.bash b/contrib/gocryptfs-maybe.bash
index daf3e60..d83dd91 100755
--- a/contrib/gocryptfs-maybe.bash
+++ b/contrib/gocryptfs-maybe.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Conditionally try to mount a gocryptfs filesystem. If either
# * CIPHERDIR/gocryptfs.conf does not exist OR
diff --git a/contrib/maxlen.bash b/contrib/maxlen.bash
index be5f7a6..4cf5802 100755
--- a/contrib/maxlen.bash
+++ b/contrib/maxlen.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Find out the maximum supported filename length and print it.
#
diff --git a/internal/siv_aead/benchmark.bash b/internal/siv_aead/benchmark.bash
index 40b57b3..400c134 100755
--- a/internal/siv_aead/benchmark.bash
+++ b/internal/siv_aead/benchmark.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -eu
diff --git a/internal/speed/benchmark.bash b/internal/speed/benchmark.bash
index d2678a7..699ceb8 100755
--- a/internal/speed/benchmark.bash
+++ b/internal/speed/benchmark.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -eu
diff --git a/internal/stupidgcm/benchmark.bash b/internal/stupidgcm/benchmark.bash
index 8681495..8319659 100755
--- a/internal/stupidgcm/benchmark.bash
+++ b/internal/stupidgcm/benchmark.bash
@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env bash
exec ../speed/benchmark.bash
diff --git a/package-release-tarballs.bash b/package-release-tarballs.bash
index 881bce0..3581008 100755
--- a/package-release-tarballs.bash
+++ b/package-release-tarballs.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -eu
diff --git a/profiling/ls.bash b/profiling/ls.bash
index 35f5a39..334d8be 100755
--- a/profiling/ls.bash
+++ b/profiling/ls.bash
@@ -1,4 +1,6 @@
-#!/bin/bash -eu
+#!/usr/bin/env bash
+
+set -eu
cd "$(dirname "$0")"
diff --git a/profiling/streaming-read.bash b/profiling/streaming-read.bash
index 86ef942..138148c 100755
--- a/profiling/streaming-read.bash
+++ b/profiling/streaming-read.bash
@@ -1,4 +1,6 @@
-#!/bin/bash -eu
+#!/usr/bin/env bash
+
+set -eu
cd "$(dirname "$0")"
diff --git a/profiling/streaming-write.bash b/profiling/streaming-write.bash
index 6f3af56..3c29ee6 100755
--- a/profiling/streaming-write.bash
+++ b/profiling/streaming-write.bash
@@ -1,4 +1,6 @@
-#!/bin/bash -eu
+#!/usr/bin/env bash
+
+set -eu
cd "$(dirname "$0")"
diff --git a/profiling/tar-extract.bash b/profiling/tar-extract.bash
index f176368..e98100a 100755
--- a/profiling/tar-extract.bash
+++ b/profiling/tar-extract.bash
@@ -1,4 +1,6 @@
-#!/bin/bash -eu
+#!/usr/bin/env bash
+
+set -eu
cd "$(dirname "$0")"
diff --git a/profiling/write-trace.bash b/profiling/write-trace.bash
index 31af492..8b7cec9 100755
--- a/profiling/write-trace.bash
+++ b/profiling/write-trace.bash
@@ -1,8 +1,10 @@
-#!/bin/bash -eu
+#!/usr/bin/env bash
#
# Write an execution trace of writing 100MB of data
# to a new gocryptfs mount on /tmp
+set -eu
+
cd "$(dirname "$0")"
T=$(mktemp -d)
diff --git a/test-without-openssl.bash b/test-without-openssl.bash
index e596753..d2cd7e4 100755
--- a/test-without-openssl.bash
+++ b/test-without-openssl.bash
@@ -1,4 +1,6 @@
-#!/bin/bash -eu
+#!/usr/bin/env bash
+
+set -eu
cd "$(dirname "$0")"
diff --git a/test.bash b/test.bash
index d5da874..12e6b7f 100755
--- a/test.bash
+++ b/test.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# test.bash runs the gocryptfs test suite against $TMPDIR,
# or, if unset, /var/tmp.
diff --git a/tests/canonical-benchmarks.bash b/tests/canonical-benchmarks.bash
index 4c1a357..963fd6a 100755
--- a/tests/canonical-benchmarks.bash
+++ b/tests/canonical-benchmarks.bash
@@ -1,4 +1,4 @@
-#!/bin/bash -eu
+#!/usr/bin/env bash
#
# Run the set of "canonical" benchmarks that are shown on
# https://nuetzlich.net/gocryptfs/comparison/
@@ -6,6 +6,7 @@
#
# This is called by the top-level script "benchmark.bash".
+set -eu
MYNAME=$(basename "$0")
diff --git a/tests/dl-linux-tarball.bash b/tests/dl-linux-tarball.bash
index 03c0e7d..3c325db 100755
--- a/tests/dl-linux-tarball.bash
+++ b/tests/dl-linux-tarball.bash
@@ -1,8 +1,10 @@
-#!/bin/bash -eu
+#!/usr/bin/env bash
#
# This script checks the size of /tmp/linux-3.0.tar.gz and downloads
# a fresh copy if the size is incorrect or the file is missing.
+set -eu
+
URL=https://cdn.kernel.org/pub/linux/kernel/v3.0/linux-3.0.tar.gz
TGZ=/tmp/linux-3.0.tar.gz
diff --git a/tests/fuse-unmount.bash b/tests/fuse-unmount.bash
index b36f28c..02c6e4c 100755
--- a/tests/fuse-unmount.bash
+++ b/tests/fuse-unmount.bash
@@ -1,10 +1,13 @@
-#!/bin/bash -eu
+#!/usr/bin/env bash
#
# Compatibility wrapper around "fusermount" on Linux and "umount" on
# Mac OS X and friends.
#
# This script can be sourced or executed directly.
#
+
+set -eu
+
fuse-unmount() {
local MYNAME=$(basename "$BASH_SOURCE")
if [[ $# -eq 0 ]] ; then
diff --git a/tests/reverse/linux-tarball-test.bash b/tests/reverse/linux-tarball-test.bash
index 4054c29..27afa23 100755
--- a/tests/reverse/linux-tarball-test.bash
+++ b/tests/reverse/linux-tarball-test.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -eu
diff --git a/tests/sshfs-benchmark.bash b/tests/sshfs-benchmark.bash
index 4695f8d..2421f20 100755
--- a/tests/sshfs-benchmark.bash
+++ b/tests/sshfs-benchmark.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -eu
diff --git a/tests/stress_tests/extractloop.bash b/tests/stress_tests/extractloop.bash
index 1f78a5e..714d2d7 100755
--- a/tests/stress_tests/extractloop.bash
+++ b/tests/stress_tests/extractloop.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Mount a gocryptfs filesystem somewhere on /tmp, then run two parallel
# infinite loops inside that do the following:
diff --git a/tests/stress_tests/fsstress-gocryptfs.bash b/tests/stress_tests/fsstress-gocryptfs.bash
index e6c3281..7e3f160 100755
--- a/tests/stress_tests/fsstress-gocryptfs.bash
+++ b/tests/stress_tests/fsstress-gocryptfs.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Mount a gocryptfs filesystem in /var/tmp and run fsstress against it
# in an infinite loop, only exiting on errors.
diff --git a/tests/stress_tests/pingpong.bash b/tests/stress_tests/pingpong.bash
index d0d21b3..4fd5ff2 100755
--- a/tests/stress_tests/pingpong.bash
+++ b/tests/stress_tests/pingpong.bash
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Mounts two gocryptfs filesystems, "ping" and "pong" and moves the
# linux-3.0 kernel tree back and forth between them, checking integrity