Files
google-apis-rs/etc/bin/update-json.sh
Sebastian Thiel 35bd1c3e9c fix(resources): first recursive resource support
However, this also means we need recursive builders, which is tottally
unsupported for now ... .

This means we have to generalize rbuild generation ... could be easy.
Lets see
2015-03-10 11:04:25 +01:00

12 lines
462 B
Bash
Executable File

#!/bin/bash
repo_path=${1:?First argument must be the part to the google go API clients repository}
api_base=${2:?Second argument must be the destination path to which to copy the APIs}
(cd ${repo_path} && git pull --ff-only) || exit $?
for json_path in `cd ${repo_path} && find . -type f -name "*-api.json" -or -name "*-gen.go"`; do
dest=${api_base}/`dirname ${json_path}`
mkdir -p ${dest} || exit $?
cp ${repo_path}/${json_path} ${dest} || exit $?
done