#!/usr/bin/env bash
mkdir -p riscv-isa-manual
git clone https://fast-mirror.isrs.ac.cn/riscv-toolchains/git/riscv/riscv-isa-manual.git riscv-isa-manual
pushd riscv-isa-manual
cat >>.git/config <<EOF
[submodule "docs-resources"]
	active = true
	url = https://fast-mirror.isrs.ac.cn/riscv-toolchains/git/riscv/riscv-isa-manual/docs-resources.git
EOF
mkdir -p docs-resources
git clone https://fast-mirror.isrs.ac.cn/riscv-toolchains/git/riscv/riscv-isa-manual/docs-resources.git docs-resources
git submodule init docs-resources
git submodule update docs-resources
pushd docs-resources
popd
git submodule absorbgitdirs
popd
