-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtest-git.sh
More file actions
executable file
·42 lines (34 loc) · 808 Bytes
/
test-git.sh
File metadata and controls
executable file
·42 lines (34 loc) · 808 Bytes
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
#
# test currently installed {j,}git versions for https, ssh git interop
#
if [ -z "${cwtop}" ] ; then
echo "is this crosware?" 1>&2
exit 1
fi
td="${cwtop}/tmp"
if [ ! -e "${td}" ] ; then
echo "no ${cwtop}/tmp dir" 1>&2
exit 1
fi
: ${GIT_SSH_COMMAND=""}
test -z "${GIT_SSH_COMMAND}" && export GIT_SSH_COMMAND=ssh || true
gh="github.com"
bpr="ryanwoodsmall/vimrcs.git"
co="$(basename ${bpr%%.git})"
repos="https://${gh}/${bpr}"
if $(${GIT_SSH_COMMAND} git@${gh} |& grep -qi successfully) ; then
repos+=" git@${gh}:${bpr}"
fi
pushd "${td}"
for u in ${repos} ; do
for g in $(realpath ${cwsw}/*/current/bin/{git{,libressl},jgitsh} | sort -u) ; do
rm -rf "${co}"
echo "${g} : ${u}"
"${g}" clone "${u}"
echo ${?}
echo
rm -rf "${co}"
done
done
popd