summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteph Enders <steph@senders.io>2023-11-11 23:00:46 -0500
committerSteph Enders <steph@senders.io>2023-11-11 23:00:46 -0500
commitc5d876faff7deef0506a9c7b2de3a169ca6c8e45 (patch)
tree243b23803c83071f8de685eb4b000ede300969a2
parent39043ba7b727140fd7bd9703006fca61e3fddcdb (diff)
Set default file to the working dir log.tsv
-rwxr-xr-xlog.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/log.sh b/log.sh
index d812c84..57ae19e 100755
--- a/log.sh
+++ b/log.sh
@@ -6,12 +6,11 @@ source $WORKING_DIR/.venv/bin/activate
python3 -m pip install -I --disable-pip-version-check -r $WORKING_DIR/requirements.txt
if [[ $# -ne 1 ]]; then
- echo "You must supply a target file"
- exit 1
+ OUTPUT=$WORKING_DIR/log.tsv
+else
+ OUTPUT=$1
fi
-OUTPUT=$1
-
if [[ ! -f $OUTPUT ]]; then
speedtest-cli --csv-header | sed -E 's/,/\t/g' > $OUTPUT
fi