ClickHouse/src/Storages/System/StorageSystemLicenses.sh

16 lines
378 B
Bash
Raw Normal View History

2020-05-11 02:39:01 +00:00
#!/bin/bash
ROOT_PATH="$(git rev-parse --show-toplevel)"
IFS=$'\t'
echo "// autogenerated by $0"
echo "const char * library_licenses[] = {"
${ROOT_PATH}/utils/list-licenses/list-licenses.sh | while read row; do
arr=($row)
echo "\"${arr[0]}\", \"${arr[1]}\", \"${arr[2]}\", R\"heredoc($(cat "${ROOT_PATH}/${arr[2]}"))heredoc\","
echo
done
echo "nullptr"
echo "};"