From: Lukas Schauer Date: Sat, 12 Dec 2015 01:09:08 +0000 (+0100) Subject: don't assume we are in the same directory as the script X-Git-Tag: v0.1.0~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d00950572a896b70cad20a6255b6a06d705e08a;p=thirdparty%2Fdehydrated.git don't assume we are in the same directory as the script --- diff --git a/letsencrypt.sh b/letsencrypt.sh index 46014a3..2e080d3 100755 --- a/letsencrypt.sh +++ b/letsencrypt.sh @@ -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