From c9ac620b33000e755d86cc8c07e9b2f51fd19a8a Mon Sep 17 00:00:00 2001 From: Kyle Brown Date: Wed, 24 Jan 2024 21:33:30 -0800 Subject: [PATCH] fix: Add readme and fix shellcheck --- README.md | 11 +++++++++++ ncdm.sh | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..003adeb --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# Not Crystaldiskmark + +I wanted something to compare disks on Linux/Mac and enjoy +CDM as a great generalized baseline. This uses fio to reproduce +the same results in Linux. The simple curses library is included +to produce a cleaner output, but is not required for use. + +```bash +# Defaults to running in current directory if not specified +ncdm.sh /mnt/bla +``` diff --git a/ncdm.sh b/ncdm.sh index d6e606d..eed2c65 100644 --- a/ncdm.sh +++ b/ncdm.sh @@ -8,7 +8,7 @@ command -v jq >/dev/null 2>&1 || { echo >&2 "Package 'jq' not installed. Abortin LOOPS=1 # How many times to run each test SIZE=1024m # File size -if [ -z $1 ]; then +if [ -z "$1" ]; then TARGET=$HOME echo "Defaulting to $TARGET for testing" else