-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsync-submodules.sh
More file actions
54 lines (46 loc) · 1.21 KB
/
sync-submodules.sh
File metadata and controls
54 lines (46 loc) · 1.21 KB
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
#!/usr/bin/env bash
# The required submodule commits are as follows:
ZLIB=v1.2.11
LIBSSH2=libssh2-1.9.0
OPENSSL=1.1.1d_2
LIBGIT2=v0.28.4
# get the scripts current directory to allow for calls from outside the top-level
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
VENDOR_PATH=vendor
# checkout zlib
echo checking out zlib...
cd $DIR/$VENDOR_PATH/zlib
# fetch and ensure all tags are avaliable locally
git fetch --all --tags --prune
# checkout
git checkout tags/$ZLIB
git reset
git clean -f
#checkout libssh2
echo checking out libssh2...
cd $DIR/$VENDOR_PATH/libssh2
# fetch and ensure all tags are avaliable locally
git fetch --all --tags --prune
# checkout
git checkout tags/$LIBSSH2
git reset
git clean -f
#checkout openssl
echo checking out openssl...
cd $DIR/$VENDOR_PATH/openssl-windows-binaries
# fetch and ensure all tags are avaliable locally
git fetch --all --tags --prune
# checkout
git checkout tags/$OPENSSL
git reset
git clean -f
#checkout libgit2
echo checking out libgit2...
cd $DIR/$VENDOR_PATH/libgit2
# fetch and ensure all tags are avaliable locally
git fetch --all --tags --prune
# checkout
git checkout tags/$LIBGIT2
git reset
git clean -f
echo "=> Synchronizing Submodules Complete"