mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 23:36:16 -04:00
Fixed sed command in postinstall script to be platform dependent
This commit is contained in:
parent
e53108c493
commit
345ad741b3
2 changed files with 7 additions and 1 deletions
|
@ -172,7 +172,7 @@
|
||||||
"testui": "grunt testui",
|
"testui": "grunt testui",
|
||||||
"testuidev": "npx nightwatch --env=dev",
|
"testuidev": "npx nightwatch --env=dev",
|
||||||
"lint": "grunt lint",
|
"lint": "grunt lint",
|
||||||
"postinstall": "find ./node_modules/crypto-api/src/ \\( -type d -name .git -prune \\) -o -type f -print0 | xargs -0 sed -i '' -e '/\\.mjs/!s/\\(from \"\\.[^\"]*\\)\";/\\1.mjs\";/g'",
|
"postinstall": "sh postinstall.sh",
|
||||||
"newop": "node --experimental-modules src/core/config/scripts/newOperation.mjs"
|
"newop": "node --experimental-modules src/core/config/scripts/newOperation.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
6
postinstall.sh
Executable file
6
postinstall.sh
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
# Add file extensions to Crypto-Api imports
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
find ./node_modules/crypto-api/src/ \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i '' -e '/\.mjs/!s/\(from "\.[^"]*\)";/\1.mjs";/g'
|
||||||
|
else
|
||||||
|
find ./node_modules/crypto-api/src/ \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i -e '/\.mjs/!s/\(from "\.[^"]*\)";/\1.mjs";/g'
|
||||||
|
fi
|
Loading…
Add table
Add a link
Reference in a new issue