#!/bin/sh readonly ROOT=$(readlink -f $(dirname $0)/..) : ${RULES_CC_REPO:=https://github.com/just-buildsystem/rules-cc} : ${RULES_CC_BRANCH:=master} : ${RULES_RUST_REPO:=https://github.com/just-buildsystem/rules-rust} : ${RULES_RUST_BRANCH:=master} # remove files generated by just-import-cargo rm -rf etc/deps-rust etc/defaults/rust/TARGETS.cargo_import # common to all cargo imports rm -f src/rust/cargo/circle/Cargo.lock src/rust/cargo/circle/TARGETS # crate just-import-git -C ${ROOT}/etc/repos.template.json \ --as rules -b ${RULES_CC_BRANCH} ${RULES_CC_REPO} rules \ | just-import-git -C - \ --as rules-rust -b ${RULES_RUST_BRANCH} ${RULES_RUST_REPO} rules-rust \ | just-import-cargo --repo-root ${ROOT} -rst src/rust/cargo/circle \ | just-deduplicate-repos \ | hdump > ${ROOT}/etc/repos.json