From 664d9d19ae772495cb1c3903d80a5761bf7323ec Mon Sep 17 00:00:00 2001 From: Ezri Zhu Date: Thu, 27 Jun 2024 22:17:03 -0400 Subject: [PATCH] address shellcheck --- benchmark/main.sh | 11 ++++++----- benchmark/rustup.sh | 16 ++++++++++------ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/benchmark/main.sh b/benchmark/main.sh index 1109479b..a65d89f3 100644 --- a/benchmark/main.sh +++ b/benchmark/main.sh @@ -1,9 +1,11 @@ +#!/bin/bash + sudo apt remove -y mergerfs echo "echo, nomerger" > csv for i in $(seq 1 10) do - echo nomerger $i + echo nomerger "$i" ./echo.sh >> csv done @@ -11,7 +13,7 @@ echo "rustup, nomerger" >> csv export TMPDIR="/home/ezri/tmp" for i in $(seq 1 10) do - echo nomerger $i + echo nomerger "$i" ./rustup.sh >> csv done @@ -19,7 +21,7 @@ sudo apt install -y mergerfs echo "echo, merger" >> csv for i in $(seq 1 10) do - echo nomerger $i + echo merger "$i" ./echo.sh >> csv done @@ -28,7 +30,6 @@ echo "rustup, merger" >> csv export TMPDIR="/mnt" for i in $(seq 1 10) do - echo merger $i + echo merger "$i" ./rustup.sh >> csv done - diff --git a/benchmark/rustup.sh b/benchmark/rustup.sh index 3461ed78..5750f688 100644 --- a/benchmark/rustup.sh +++ b/benchmark/rustup.sh @@ -1,8 +1,12 @@ +#!/bin/bash + export TMPDIR=/mnt -export CARGO_HOME=$(mktemp -d) -export RUSTUP_HOME=$(mktemp -d) -echo $CARGO_HOME -echo $RUSTUP_HOME +CARGO_HOME=$(mktemp -d) +export CARGO_HOME +RUSTUP_HOME=$(mktemp -d) +export RUSTUP_HOME +echo "$CARGO_HOME" +echo "$RUSTUP_HOME" ./timed-csv.sh tests/rustup.sh -du -hs $CARGO_HOME -du -hs $RUSTUP_HOME +du -hs "$CARGO_HOME" +du -hs "$RUSTUP_HOME"