Skip to content

Commit

Permalink
build(fix): add full path to inkscape command
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsneighbour committed Nov 15, 2022
1 parent 83cabeb commit 8ea5cf3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/build/component-cards
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ for TOOL in "${REQUIRED_TOOLS[@]}"; do
exit 1
fi
done

# file location
IMAGEPATH="./assets/images"
CURPATH="$(pwd -P)"
IMAGEPATH="${CURPATH}/assets/images"
COMPONENTPATH="./content/components"

# go through elements
Expand All @@ -23,7 +23,7 @@ for DIRNAME in "${COMPONENTPATH}"/*/; do
TERM=${DIR/hugo\-/}
find_string='>NAME<'
replace_string=">${TERM^^}<"
sed -E "s/${find_string}/${replace_string}/" ${IMAGEPATH}/components-header.svg >"${IMAGEPATH}"/temp.svg
sed -E "s/${find_string}/${replace_string}/" "${IMAGEPATH}"/components-header.svg >"${IMAGEPATH}"/temp.svg
inkscape "${IMAGEPATH}"/temp.svg --export-filename="${COMPONENTPATH}"/"${DIR}"/header-card.png &>/dev/null
optipng -strip all -quiet -o7 "${COMPONENTPATH}"/"${DIR}"/header-card.png
rm -f "${IMAGEPATH}"/temp.svg
Expand Down

0 comments on commit 8ea5cf3

Please sign in to comment.