Skip to content

Commit

Permalink
refactor: use bash source directory
Browse files Browse the repository at this point in the history
  • Loading branch information
sethfischer committed Jun 11, 2021
1 parent 50ba205 commit 1441d7f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lint-svg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ shopt -s globstar

exit_code=0

directory="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

while IFS= read -r -d $'\0' filename; do
if [ -f "$filename" ]; then
echo "Check formatting of ${filename}"
Expand All @@ -16,6 +18,6 @@ while IFS= read -r -d $'\0' filename; do
echo "Pass"
fi
fi
done < <(git ls-files -z -- "./**.svg")
done < <(git ls-files -z -- "${directory}/**.svg")

exit $exit_code

0 comments on commit 1441d7f

Please sign in to comment.