File size: 1,552 Bytes
bf3d2af
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
# Shallow-clone permissively licensed source repos for the calibration corpus.
RAW=/home/boris/.cache/calib-build/raw
mkdir -p "$RAW"

# name|url  (licenses verified post-clone from each repo's LICENSE file)
REPOS="
three.js|https://github.com/mrdoob/three.js
drei|https://github.com/pmndrs/drei
react-three-fiber|https://github.com/pmndrs/react-three-fiber
gl-matrix|https://github.com/toji/gl-matrix
webgpu-samples|https://github.com/webgpu/webgpu-samples
webgl-fundamentals|https://github.com/gfxfundamentals/webgl-fundamentals
thebookofshaders|https://github.com/patriciogonzalezvivo/thebookofshaders
webgl-noise|https://github.com/stegu/webgl-noise
pixijs|https://github.com/pixijs/pixijs
tween.js|https://github.com/tweenjs/tween.js
glTF-Sample-Viewer|https://github.com/KhronosGroup/glTF-Sample-Viewer
ripgrep|https://github.com/BurntSushi/ripgrep
serde|https://github.com/serde-rs/serde
fmt|https://github.com/fmtlib/fmt
json-cpp|https://github.com/nlohmann/json
requests|https://github.com/psf/requests
flask|https://github.com/pallets/flask
vite|https://github.com/vitejs/vite
"

echo "$REPOS" | grep -v '^$' | while IFS='|' read -r name url; do
  echo "$name $url"
done | xargs -P 6 -n 2 bash -c '
  RAW=/home/boris/.cache/calib-build/raw
  if [ -d "$RAW/$0/.git" ]; then echo "SKIP $0"; exit 0; fi
  rm -rf "$RAW/$0"
  if git clone --depth 1 --single-branch --quiet "$1" "$RAW/$0" 2>/dev/null; then
    echo "OK   $0  $(du -sh "$RAW/$0" | cut -f1)"
  else
    echo "FAIL $0  $1"
  fi
'
echo "=== DONE ==="
du -sh "$RAW"