mirror of
https://github.com/swc-project/swc.git
synced 2024-12-23 21:54:36 +03:00
08a9e21b36
Co-authored-by: Donny/강동윤 <kdy1997.dev@gmail.com>
17 lines
420 B
Bash
Executable File
17 lines
420 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eu
|
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
|
|
function toLine {
|
|
# >&2 echo "toLine: $@"
|
|
arr=(${1//,/ })
|
|
# >&2 echo "arr: ${arr[0]} ${arr[1]}"
|
|
dir="$(dirname ${arr[1]})"
|
|
echo "${arr[0]} = { path = '$dir' }"
|
|
}
|
|
|
|
export -f toLine
|
|
|
|
$SCRIPT_DIR/list-crates.sh | jq '[.name, .manifest_path] | @csv' -r | xargs -I {} bash -c 'toLine "$@"' _ {} |