Support fetching of git over https:// as seen in eduID

This commit is contained in:
John Van de Meulebrouck Brendgard 2016-08-28 00:08:37 +02:00
parent b56799bcc6
commit a94f87c41c
No known key found for this signature in database
GPG key ID: 807A5FD4B3337B77

View file

@ -24,8 +24,8 @@ if [ -f $CONFIG ]; then
# First pass to clone any new modules, and update those marked for updating. # First pass to clone any new modules, and update those marked for updating.
grep -E -v "^#" $CONFIG | ( grep -E -v "^#" $CONFIG | (
while read module src update pattern; do while read module src update pattern; do
# We only support git:// urls atm # We only support git:// urls and https:// urls atm
if [ "${src:0:6}" = "git://" ]; then if [ "${src:0:6}" = "git://" -o "${src:0:8}" = "https://" ]; then
if [ ! -d $CACHE_DIR/scm/$module ]; then if [ ! -d $CACHE_DIR/scm/$module ]; then
git clone -q $src $CACHE_DIR/scm/$module git clone -q $src $CACHE_DIR/scm/$module
elif [ -d $CACHE_DIR/scm/$module/.git ]; then elif [ -d $CACHE_DIR/scm/$module/.git ]; then
@ -63,7 +63,7 @@ if [ -f $CONFIG ]; then
grep -E -v "^#" $CONFIG | ( grep -E -v "^#" $CONFIG | (
while read module src update pattern; do while read module src update pattern; do
# We only support git:// urls atm # We only support git:// urls atm
if [ "${src:0:6}" = "git://" ]; then if [ "${src:0:6}" = "git://" -o "${src:0:8}" = "https://" ]; then
# Verify git tag # Verify git tag
cd $CACHE_DIR/scm/$module cd $CACHE_DIR/scm/$module
TAG=$(git tag -l "${pattern:-*}" | sort | tail -1) TAG=$(git tag -l "${pattern:-*}" | sort | tail -1)