diff options
| author | Paul Buetow <paul@buetow.org> | 2022-07-30 11:21:06 +0100 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2022-07-30 11:21:06 +0100 |
| commit | d5ee29f3da9dd09278ebea7464e21fae40911130 (patch) | |
| tree | 406eabb8891291ff17d6913ef75ec71ebbb31fb7 | |
| parent | 3dcf326d3ab8e416d25477b59573354748b1817e (diff) | |
automatically check whether date, grep and sed are GNU or not
| -rwxr-xr-x | gemtexter | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -49,6 +49,16 @@ Example: HELPHERE } +# Make sure that there are the correct versions of the dependencies installed. +ensure_gnu () { + for tool in $DATE $SED $GREP; do + if ! $tool --version | grep -q GNU; then + log ERROR "ERROR, \"$tool\" command is not the GNU version, please install!" + exit 2 + fi + done +} + setup () { if [ ! -d "$CONTENT_BASE_DIR" ]; then cat <<END @@ -74,6 +84,7 @@ END main () { local -r arg="$1"; shift + ensure_gnu setup case $arg in |
