mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 23:27:56 +03:00
16 lines
438 B
Bash
Executable File
16 lines
438 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Naive substitution to napi artifacts for the cli binary.
|
|
for filename in artifacts/*/*.node
|
|
do
|
|
BINDING_NAME=${filename#*.}
|
|
BINDING_ABI=${BINDING_NAME%%.*}
|
|
CLI_BINARY_PATH=${filename%%.*}
|
|
|
|
if [ -f "$CLI_BINARY_PATH" ]; then
|
|
chmod +x $CLI_BINARY_PATH
|
|
mv $CLI_BINARY_PATH ./scripts/npm/$BINDING_ABI
|
|
elif [ -f "$CLI_BINARY_PATH.exe" ]; then
|
|
mv $CLI_BINARY_PATH.exe ./scripts/npm/$BINDING_ABI
|
|
fi
|
|
done |