check bootstrap scripts syntax

Signed-off-by: ozkanonur <work@onurozkan.dev>
This commit is contained in:
ozkanonur 2023-05-03 20:32:39 +03:00
parent 9d795a6e6e
commit eea6202c24
2 changed files with 9 additions and 1 deletions

5
x
View file

@ -7,9 +7,12 @@
set -eu
# syntax check
sh -n $0
realpath() {
if [ -d "$1" ]; then
CDPATH='' command cd "$1" && pwd -P
CDPATH='' command cd "$1" && pwd -P
else
echo "$(realpath "$(dirname "$1")")/$(basename "$1")"
fi