Skip to content

Commit 159a819

Browse files
committed
Modify patch-hack.sh to comply with shellcheck
1 parent 95554ab commit 159a819

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

patch-hack.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ do
3535
for style in "${styles[@]}"
3636
do
3737
stylePath="${HACK_PATH}/source/Hack-${style}.ufo/glyphs"
38-
lowercaseStyle=`echo "$style" | tr '[:upper:]' '[:lower:]'`
39-
alternatePath="./glyphs/${alternate}/${lowercaseStyle}/*.glif"
38+
lowercaseStyle=$(echo "$style" | tr '[:upper:]' '[:lower:]')
39+
alternatePath="./glyphs/${alternate}/${lowercaseStyle}"
4040

41-
cp $alternatePath $stylePath
42-
if [ $? -ne 0 ]; then
41+
if ! cp "$alternatePath"/*.glif "$stylePath"; then
4342
echo "❌ Aborting patching of Hack, check errors above."
4443
exit 1
4544
fi

0 commit comments

Comments
 (0)