1
0
Fork 0
mirror of https://github.com/overleaf/toolkit.git synced 2025-04-19 23:38:06 +02:00

Doctor: handle various flavours of awk (#45)

Co-authored-by: Shane Kilkelly <shane.kilkelly@overleaf.com>
This commit is contained in:
Shane Kilkelly 2021-03-30 11:16:15 +01:00 committed by GitHub
parent 3b5fbcf1d5
commit fe73f6c3fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,6 +76,12 @@ function check_dependencies() {
bash -c 'echo $BASH_VERSION'
elif [[ "perl" == "$binary_name" ]]; then
perl -e 'print $];'
elif [[ "awk" == "$binary_name" ]]; then
if awk -Wversion > /dev/null 2>&1; then
awk -Wversion 2>&1 | head -n 1
else
awk --version | head -n 1
fi
else
$binary_name --version | head -n 1
fi