summaryrefslogtreecommitdiff
path: root/benchmark-reverse.bash
diff options
context:
space:
mode:
authora13460542021-08-31 17:01:47 +0000
committerrfjakob2021-09-01 10:22:01 +0200
commitc63f7e9f64ee394b3311edb7f36f56fd786d145a (patch)
tree84dec7ad0b4759532f622174c008e3aa645c5a29 /benchmark-reverse.bash
parentc505e73a13d8e2083b53c5c1af1f937b46665abd (diff)
shell scripts: fix shellcheck warnings
Diffstat (limited to 'benchmark-reverse.bash')
-rwxr-xr-xbenchmark-reverse.bash10
1 files changed, 5 insertions, 5 deletions
diff --git a/benchmark-reverse.bash b/benchmark-reverse.bash
index be98fc1..fad6bfe 100755
--- a/benchmark-reverse.bash
+++ b/benchmark-reverse.bash
@@ -14,18 +14,18 @@ PLAIN=linux-3.0
SIZE=0
if [[ -d $PLAIN ]]; then
- SIZE=$(du -s --apparent-size $PLAIN | cut -f1)
+ SIZE=$(du -s --apparent-size "$PLAIN" | cut -f1)
fi
if [[ $SIZE -ne 412334 ]] ; then
echo "Extracting linux-3.0.tar.gz"
- rm -Rf $PLAIN
+ rm -Rf "$PLAIN"
tar xf linux-3.0.tar.gz
fi
-rm -f $PLAIN/.gocryptfs.reverse.conf
-gocryptfs -q -init -reverse -extpass="echo test" -scryptn=10 $PLAIN
+rm -f "$PLAIN/.gocryptfs.reverse.conf"
+gocryptfs -q -init -reverse -extpass="echo test" -scryptn=10 "$PLAIN"
MNT=$(mktemp -d /tmp/linux-3.0.reverse.mnt.XXX)
@@ -37,7 +37,7 @@ gocryptfs -q -reverse -extpass="echo test" "$PLAIN" "$MNT"
# Execute command, discard all stdout output, print elapsed time
# (to stderr, unfortunately).
-function etime {
+etime() {
# Make the bash builtin "time" print out only the elapse wall clock
# seconds
TIMEFORMAT=%R