Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Commit

Permalink
Merge pull request #286 from paritytech/luke-285-script-sed-error
Browse files Browse the repository at this point in the history
fix: Fixes #285 sed error on macOS
  • Loading branch information
amaury1093 authored Dec 13, 2018
2 parents 844c657 + db79274 commit 2cb5494
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/fether-electron/scripts/fixElectronBug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ FIND='process.resourcesPath + "\/static"'
REPLACE='"${path.join(configurator.projectDir, "static").replace(\/\\\\\/g, "\\\\\\\\")}"'
FILE='./node_modules/electron-webpack/out/targets/MainTarget.js'
case "$OSTYPE" in
darwin*) sed -i '.bak' "s/$FIND/$REPLACE/g" $FILE ;;
# On macOS (darwin), run the in-built Sed binary explicitly to avoid any conflicts with GNU Sed
darwin*) /usr/bin/sed -i '.bak' "s/$FIND/$REPLACE/g" $FILE ;;
*) sed -i "s/$FIND/$REPLACE/g" $FILE ;;
esac
2 changes: 1 addition & 1 deletion packages/fether-electron/scripts/revertElectronBug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ FIND='"${path.join(configurator.projectDir, "static").replace(\/\\\\\/g, "\\\\\\
REPLACE='process.resourcesPath + "\/static"'
FILE='./node_modules/electron-webpack/out/targets/MainTarget.js'
case "$OSTYPE" in
darwin*) sed -i '.bak' "s/$FIND/$REPLACE/g" $FILE ;;
darwin*) /usr/bin/sed -i '.bak' "s/$FIND/$REPLACE/g" $FILE ;;
*) sed -i "s/$FIND/$REPLACE/g" $FILE ;;
esac

0 comments on commit 2cb5494

Please sign in to comment.