]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
don't assume we are in the same directory as the script
authorLukas Schauer <lukas@schauer.so>
Sat, 12 Dec 2015 01:09:08 +0000 (02:09 +0100)
committerLukas Schauer <lukas@schauer.so>
Sat, 12 Dec 2015 01:09:08 +0000 (02:09 +0100)
letsencrypt.sh

index 46014a3f054d4fb138834f4615862843c1d1b2cd..2e080d3bd4e6fb0f7da4ac81fc34beb29cc39d8f 100755 (executable)
@@ -443,7 +443,7 @@ command_help() {
   echo
   (
   echo "Commands:"
-  grep -e '# Usage:' -e '# Description:' -e '^command_.*()\s*{' letsencrypt.sh | while read -r usage; read -r description; read -r command; do
+  grep -e '# Usage:' -e '# Description:' -e '^command_.*()\s*{' "${0}" | while read -r usage; read -r description; read -r command; do
     if [[ ! "${usage}" =~ Usage ]]; then
       echo "Error generating help text."
       exit 1
@@ -458,7 +458,7 @@ command_help() {
   done
   echo "---"
   echo "Parameters:"
-  grep -E -e '^\s*# PARAM_Usage:' -e '^\s*# PARAM_Description:' letsencrypt.sh | while read -r usage; read -r description; do
+  grep -E -e '^\s*# PARAM_Usage:' -e '^\s*# PARAM_Description:' "${0}" | while read -r usage; read -r description; do
     if [[ ! "${usage}" =~ Usage ]]; then
       echo "Error generating help text."
       exit 1