12345678910111213141516171819202122232425262728293031323334353637383940 |
- #!/bin/bash
- if [[ $BASH_SOURCE = */* ]]; then
- cd -- "${BASH_SOURCE%/*}/" || exit
- fi
- mkdir -p comps
- clone_or_update() {
- repourl="$1"
- repodir="$2"
- tag="$3"
- if [ -d comps/${repodir}/.git ]; then
- ( cd comps/${repodir} && git fetch --tags -f origin && \
- git checkout $tag && git pull ) || exit 1
- else
- ( cd comps && git clone ${repourl} ${repodir} && cd ${repodir} && \
- git checkout $tag ) || exit 1
- fi
- }
- clone_or_update \
- https://git-crysp.uwaterloo.ca/avadapal/3p-circuit-oram-prac-repro \
- circuit-oram master
- clone_or_update \
- https://git-crysp.uwaterloo.ca/avadapal/ramen-dockerization \
- ramen master
|