Merge pull request #1195 from keegancsmith/mac

scripts: Use different flags for sed and base64 on Mac
This commit is contained in:
Oliver Blanthorn 2018-11-26 11:54:49 +00:00 committed by GitHub
commit cbfcf94c45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,7 +76,12 @@ else
fi
if [ -e "$TRIDACTYL_LOGO" ] ; then
sed "s@REPLACE_ME_WITH_BASE64_TRIDACTYL_LOGO@$(base64 --wrap 0 "$TRIDACTYL_LOGO")@" -i build/static/themes/default/default.css
# sed and base64 take different arguments on Mac
if [[ $OSTYPE == darwin* ]]; then
sed -i "" "s@REPLACE_ME_WITH_BASE64_TRIDACTYL_LOGO@$(base64 "$TRIDACTYL_LOGO")@" build/static/themes/default/default.css
else
sed "s@REPLACE_ME_WITH_BASE64_TRIDACTYL_LOGO@$(base64 --wrap 0 "$TRIDACTYL_LOGO")@" -i build/static/themes/default/default.css
fi
else
echo "Couldn't find Tridactyl logo ($TRIDACTYL_LOGO)"
fi