Skip to content

Commit 0392c43

Browse files
committed
Cleanup this script
1 parent d2e4713 commit 0392c43

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

script/clone-example-repos

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
#!/bin/bash
22
#/ Usage: script/clone-example-repos
33
#/
4-
#/ Clone some example repositories for smoke testing parsing and assignment
4+
#/ Clone some example repositories for smoke testing parsing, assignment, and precise ASTs.
55
#/
66
#/ NOTES:
77
#/ - This script is intended to be called by `test/Examples.hs`
8-
#/ - Go and Ruby examples are in submodules
9-
#/ - PHP doesn't have any parse-examples
10-
#/ - Java and Haskell have good examples, but they have assignment failures so currently aren't tested
11-
128

139
set -e
1410
cd $(dirname "$0")/..
1511

16-
# mkdir -p test/examplerepos || true
17-
# git clone --single-branch --recurse-submodules https://github.com/tree-sitter/haskell-tree-sitter.git tmp/haskell-tree-sitter || true
1812
mkdir -p tmp
19-
# dir="tmp/haskell-tree-sitter"
2013

2114
# clone_repo LOCAL_PATH URL SHA
2215
function clone_repo {
@@ -36,6 +29,10 @@ function clone_repo {
3629
popd > /dev/null
3730
}
3831

32+
go_examples="tmp/go-examples"
33+
clone_repo "$go_examples/go" golang/go 870e12d7bfaea70fb0d743842f5864eb059cb939
34+
clone_repo "$go_examples/moby" moby/moby f57f260b49b6142366e6bc1274204ee0a1205945
35+
3936
python_examples="tmp/python-examples"
4037
clone_repo "$python_examples/numpy" numpy/numpy 058851c5cfc98f50f11237b1c13d77cfd1f40475
4138
clone_repo "$python_examples/thealgorithms" thealgorithms/python c6be53e1c43f870f5364eef1499ee1b411c966fb
@@ -48,6 +45,9 @@ clone_repo "$python_examples/scrapy" scrapy/scrapy 65d631329a1434ec013f24341e4b8
4845
clone_repo "$python_examples/pytorch" pytorch/pytorch c865d46736db4afff51690a712e35ed8e3899490
4946
clone_repo "$python_examples/certbot" certbot/certbot bb8222200a8cbd39a3ce9584ce6dfed6c5d05228
5047

48+
ruby_examples="tmp/ruby-examples"
49+
clone_repo "$ruby_examples/ruby_spec" ruby/spec c3e6b9017926f44a76e2b966c4dd35fa84c4cd3b
50+
5151
ts_examples="tmp/typescript-examples"
5252
clone_repo "$ts_examples/desktop" desktop/desktop d1324f56d02dd9afca5d2e9da545905a7d41d671
5353
clone_repo "$ts_examples/npm" npm/npm ee147fbbca6f2707d3b16f4fa78f4c4606b2d9b1
@@ -58,13 +58,6 @@ clone_repo "$ts_examples/npm" npm/npm ee147fbbca6f2707d3b16f4fa78f4c4606b2d9b1
5858
# clone_repo "$java_examples/RxJava" ReactiveX/RxJava 8a6bf14fc9a61f7c1c0016ca217be02ca86211d2
5959

6060
# haskell_examples="$dir/tree-sitter-haskell/vendor/tree-sitter-haskell/examples"
61-
# # clone_repo "$haskell_examples/effects" joshvera/effects 08f5f36f2600362685af593f4b327e933b60bf97
62-
# # clone_repo "$haskell_examples/postgrest" PostgRest/postgrest f80cfbf165f951a062b3cbedac4556019905ca49
63-
# # clone_repo "$haskell_examples/ivory" GaloisInc/ivory 3d00324ad1c113c7e70957ff6a6d636d271d0fc4
64-
65-
# go_examples="$dir/tree-sitter-go/vendor/tree-sitter-go/examples"
66-
# clone_repo "$go_examples/go" "golang/go" "870e12d7bfaea70fb0d743842f5864eb059cb939"
67-
# clone_repo "$go_examples/moby" "moby/moby" "f57f260b49b6142366e6bc1274204ee0a1205945"
68-
69-
ruby_examples="tmp/ruby-examples"
70-
clone_repo "$ruby_examples/ruby_spec" "ruby/spec" "c3e6b9017926f44a76e2b966c4dd35fa84c4cd3b"
61+
# clone_repo "$haskell_examples/effects" joshvera/effects 08f5f36f2600362685af593f4b327e933b60bf97
62+
# clone_repo "$haskell_examples/postgrest" PostgRest/postgrest f80cfbf165f951a062b3cbedac4556019905ca49
63+
# clone_repo "$haskell_examples/ivory" GaloisInc/ivory 3d00324ad1c113c7e70957ff6a6d636d271d0fc4

0 commit comments

Comments
 (0)