-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
29 additions
and
18 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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o pipefail | ||
|
||
# x86_64 cross-compilation won’t fly in this pure derivation: | ||
if [[ $system == *darwin* ]]; then | ||
if [[ $system == *aarch64* ]] ; then | ||
changeFrom="x86_64" | ||
changeTo="arm64" | ||
else | ||
changeFrom="arm64" | ||
changeTo="x86_64" | ||
fi | ||
find node_modules/ -type f '(' -name '*.gyp' -o -name '*.gypi' ')' \ | ||
| xargs grep -F "$changeFrom" | cut -d: -f1 | sort --unique \ | ||
| while IFS= read -r file | ||
do | ||
sed -r "s/$changeFrom/$changeTo/g" -i "$file" | ||
done | ||
fi |
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