[FIX] web: ensure realpath is installed

With this commit, if realpath is not available (for exemple on macos),
the script is directly stopped.

closes odoo/odoo#90522

X-original-commit: 7857c577948d55842a5697ca6d91bb6ea656ef6e
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
This commit is contained in:
Pierre Rousseau
2022-05-04 19:17:45 +02:00
parent 9e65c6a00b
commit aee53b0d48
+5
View File
@@ -1,6 +1,11 @@
#!/bin/bash
community=$(cd -- "$(dirname "$0")" &> /dev/null && cd ../../.. && pwd)
tooling="$community/addons/web/tooling"
testRealPath="$(realpath --relative-to=. "$tooling/hooks")"
if [[ $testRealPath == "" ]]; then
echo "Please install realpath"
exit 1
fi
enableInDir () {
cd $1