-
Notifications
You must be signed in to change notification settings - Fork 0
/
fetch.sh
executable file
·99 lines (75 loc) · 2.88 KB
/
fetch.sh
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/bash
set -e
set -u
includedir=../src/assorthead/include
mkdir -p $includedir
transplant_headers() {
local src=$1
dest=$includedir/$(basename $src)
rm -rf $dest
cp -r sources/$src $dest
}
# Simple fetching, when a submodule can be directly added and the
# header files are directly available from the repository.
mkdir -p sources
fetch_simple() {
local name=$1
local url=$2
local version=$3
if [ ! -e sources/$name ]
then
git clone $url sources/$name
else
cd sources/$name
git fetch --all
git checkout $version
cd -
fi
}
fetch_simple aarand https://github.com/LTLA/aarand v1.0.1
transplant_headers aarand/include/aarand
fetch_simple powerit https://github.com/LTLA/powerit v1.0.0
transplant_headers powerit/include/powerit
fetch_simple kmeans https://github.com/LTLA/CppKmeans v2.0.0
transplant_headers kmeans/include/kmeans
fetch_simple byteme https://github.com/LTLA/byteme v1.0.1
transplant_headers byteme/include/byteme
fetch_simple tatami https://github.com/tatami-inc/tatami v2.1.2
transplant_headers tatami/include/tatami
fetch_simple weightedlowess https://github.com/LTLA/CppWeightedLowess v1.0.1
transplant_headers weightedlowess/include/WeightedLowess
fetch_simple umappp https://github.com/LTLA/umappp f2928b3018e9dc374fbe4553769f899e575e2f14
transplant_headers umappp/include/umappp
fetch_simple qdtsne https://github.com/LTLA/qdtsne c18897e65ed28cb9c2768ec1edd6a9c1d2f20103
transplant_headers qdtsne/include/qdtsne
fetch_simple irlba https://github.com/LTLA/CppIrlba bace9baf758ad396c3d1b8d2d090eb92891aee45
transplant_headers irlba/include/irlba
fetch_simple eigen https://gitlab.com/libeigen/eigen 3.4.0
transplant_headers eigen/Eigen
fetch_simple singlepp https://github.com/LTLA/singlepp 1d9869c3f050521a12b3151c89bc41906bf093e0
transplant_headers singlepp/include/singlepp
fetch_simple scran https://github.com/LTLA/libscran b543aaa53e7b0a894a8a54cc634bd2a0e8e089f1
transplant_headers scran/include/scran
fetch_simple mnncorrect https://github.com/LTLA/CppMnnCorrect 5ba5c790f01b3a676420892151791786dfb0a8d6
transplant_headers mnncorrect/include/mnncorrect
fetch_simple rds2cpp https://github.com/LTLA/rds2cpp v1.1.0
transplant_headers rds2cpp/include/rds2cpp
# Fetch + CMake, when a repository requires a CMake configuration
# to reorganize the headers into the right locations for consumption.
# This also handles transitive dependencies.
fetch_cmake() {
local name=$1
local url=$2
local version=$3
fetch_simple $name $url $version
cd sources/$name
if [ ! -e build ]
then
cmake -S . -B build
fi
cd -
}
fetch_cmake knncolle https://github.com/LTLA/knncolle 3ad6b8cdbd281d78c77390d5a6ded4513bdf3860
transplant_headers knncolle/include/knncolle
transplant_headers knncolle/build/_deps/annoy-build/include/annoy
transplant_headers knncolle/build/_deps/hnswlib-src/hnswlib