-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: shebang portability and fix build on NixOS (#604)
- Loading branch information
1 parent
76cac96
commit af63425
Showing
9 changed files
with
65 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
set -ueo pipefail | ||
|
||
if [[ ! "$(command -v sass)" ]]; then | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
# | ||
# Create a snapshot for comparison with the latest development version. | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
set -ueo pipefail | ||
|
||
FORCE_INKSCAPE="$(echo "${FORCE_INKSCAPE-False}" | tr '[:upper:]' '[:lower:]')" | ||
|
@@ -11,11 +11,11 @@ INKSCAPE="$(command -v inkscape)" || true | |
OPTIPNG="$(command -v optipng)" || true | ||
|
||
if [[ -n "${INKSCAPE}" ]]; then | ||
if "$INKSCAPE" --help | grep -e "--export-filename" > /dev/null; then | ||
if "$INKSCAPE" --help | grep -e "--export-filename" >/dev/null; then | ||
EXPORT_FILE_OPTION="--export-filename" | ||
elif "$INKSCAPE" --help | grep -e "--export-file" > /dev/null; then | ||
elif "$INKSCAPE" --help | grep -e "--export-file" >/dev/null; then | ||
EXPORT_FILE_OPTION="--export-file" | ||
elif "$INKSCAPE" --help | grep -e "--export-png" > /dev/null; then | ||
elif "$INKSCAPE" --help | grep -e "--export-png" >/dev/null; then | ||
EXPORT_FILE_OPTION="--export-png" | ||
fi | ||
fi | ||
|
@@ -29,11 +29,11 @@ echo "Rendering '$ASSETS_DIR/$i.png'" | |
|
||
if [[ -n "${RENDER_SVG}" ]]; then | ||
"$RENDER_SVG" --export-id "$i" \ | ||
"$SRC_FILE" "$ASSETS_DIR/$i.png" | ||
"$SRC_FILE" "$ASSETS_DIR/$i.png" | ||
else | ||
"$INKSCAPE" --export-id="$i" \ | ||
--export-id-only \ | ||
"$EXPORT_FILE_OPTION=$ASSETS_DIR/$i.png" "$SRC_FILE" >/dev/null | ||
--export-id-only \ | ||
"$EXPORT_FILE_OPTION=$ASSETS_DIR/$i.png" "$SRC_FILE" >/dev/null | ||
fi | ||
|
||
if [[ -n "${OPTIPNG}" ]]; then | ||
|
@@ -45,14 +45,14 @@ echo "Rendering '$ASSETS_DIR/[email protected]'" | |
if [[ -n "${RENDER_SVG}" ]]; then | ||
# @TODO: remove --zoom when it will be fixed/implemented in resvg | ||
"$RENDER_SVG" --export-id "$i" \ | ||
--dpi 192 \ | ||
--zoom 2 \ | ||
"$SRC_FILE" "$ASSETS_DIR/$i@2.png" | ||
--dpi 192 \ | ||
--zoom 2 \ | ||
"$SRC_FILE" "$ASSETS_DIR/$i@2.png" | ||
else | ||
"$INKSCAPE" --export-id="$i" \ | ||
--export-id-only \ | ||
--export-dpi=192 \ | ||
"$EXPORT_FILE_OPTION=$ASSETS_DIR/$i@2.png" "$SRC_FILE" >/dev/null | ||
--export-id-only \ | ||
--export-dpi=192 \ | ||
"$EXPORT_FILE_OPTION=$ASSETS_DIR/$i@2.png" "$SRC_FILE" >/dev/null | ||
fi | ||
|
||
if [[ -n "${OPTIPNG}" ]]; then | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters