1 #!/usr/bin/env bash 2 # Get The Compiler Company source code 3 SRC="${1:-comp}" 4 OUT=build/src/$SRC 5 mkdir -pv $OUT 6 pushd $OUT 7 wget https://packy.compiler.company/bundle/src/$SRC.tar.zst 8 unzstd $SRC.tar.zst 9 tar -xvf $SRC.tar 10 rm -rf $SRC.tar.zst $SRC.tar 11 for f in $(find . -name *.hg.zst); do 12 echo ""; 13 echo $f; 14 hg clone $f $(basename "$f" .hg.zst) 15 echo "... Done."; 16 done 17 popd