From a7135c8423ce344a93819b9409e7863729657469 Mon Sep 17 00:00:00 2001 From: Thord Johansson Date: Sun, 30 Apr 2023 14:15:53 +0200 Subject: [PATCH] Changed from gentpl to gentmpl --- README.md | 2 +- setup.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1433b20..958d6b4 100644 --- a/README.md +++ b/README.md @@ -4,5 +4,5 @@ Some useful system scripts for things like fan control and other convenience. You can regenerate `env-template.txt` based on the current .env file with: ```bash -./setup.sh --gentpl +./setup.sh --gentmpl ``` diff --git a/setup.sh b/setup.sh index 698403c..015dc5b 100755 --- a/setup.sh +++ b/setup.sh @@ -1,8 +1,11 @@ #!/bin/bash -if [ $1 == "--gentpl" ]; then +if [ $1 == "--gentmpl" ]; then grep "[A-Z_ ]*=" .env -o > env-template.txt exit 0 +elif [ ! -z "$1" ]; then + echo "Unrecognised parameter, use --gentmpl to generate .env template" + exit 1 fi # Installs prerequisites for some of the system scripts