summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2017-05-20 05:27:48 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-05-20 05:27:48 +0200
commit91c9e060b935fb08837d360ee4f8fd670e1185e1 (patch)
treebad14d9c7483d03ab497863cca7b72b345155385 /solenv
parentb71ad82b0e4b34ef3513f6115fe257c883700a0b (diff)
mkdocs.sh: alias cmd variant to canonical name
Otherwise being flexible during checking of required commands is a bit pointless. Change-Id: I9a6e283c816a87f35ce7913c294eaacb7da9a95b
Diffstat (limited to 'solenv')
-rwxr-xr-xsolenv/bin/mkdocs.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/solenv/bin/mkdocs.sh b/solenv/bin/mkdocs.sh
index 1be57f9cc8f5..8f627525203f 100755
--- a/solenv/bin/mkdocs.sh
+++ b/solenv/bin/mkdocs.sh
@@ -93,14 +93,15 @@ function check_cmd {
cmds_needed="$1"
error_msg="$2"
- found=0
+ found=0; cmd=
for cmd_needed in $cmds_needed; do
- which $cmd_needed > /dev/null 2>&1 && found=1
+ which $cmd_needed > /dev/null 2>&1 && { found=1; cmd=$cmd_needed; }
done
if [ $found = 0 ]; then
echo "$error_msg" >&2
exit 1
fi
+ alias "${cmds_needed%% *}"=$cmd
}
function setup {