mirror of
https://github.com/swc-project/swc.git
synced 2024-12-01 01:13:56 +03:00
15 lines
355 B
Bash
Executable File
15 lines
355 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eu
|
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
|
|
function toLine {
|
|
arr=(${1//\\\t/ })
|
|
dir="$(dirname ${arr[1]})"
|
|
echo "${arr[0]} = { path = '$dir' }"
|
|
}
|
|
|
|
export -f toLine
|
|
|
|
$SCRIPT_DIR/list-crates.sh | jq '[.name, .manifest_path] | @tsv' | xargs -L 1 -I {} bash -c 'toLine "$@"' _ {} |