Fix "iop genconfig" for public builds

This introduces an extra check to avoid attempting to clone a private customer/consumer repository, when the main SDK repo is cloned via HTTPS.
This commit is contained in:
Roman Azarenko 2020-01-29 11:22:10 +01:00
parent 97fd03d966
commit 89df7ce409
No known key found for this signature in database
GPG key ID: E7C75705408481B8

View file

@ -230,18 +230,20 @@ function genconfig {
setup_dirs()
{
if git ls-remote $CUSTREPO -q 2>/dev/null; then
if [ ! -d "$CUSTPATH" ]; then
git clone "$CUSTREPO" "$CUSTPATH"
elif [ $IMPORT -eq 1 ]; then
cd $CUSTPATH
v "git pull"
git pull
cd - >/dev/null #go back
git remote -v | grep -q http || {
if git ls-remote $CUSTREPO -q 2>/dev/null; then
if [ ! -d "$CUSTPATH" ]; then
git clone "$CUSTREPO" "$CUSTPATH"
elif [ $IMPORT -eq 1 ]; then
cd $CUSTPATH
v "git pull"
git pull
cd - >/dev/null #go back
fi
else
echo "You do not have access to $CUSTREPO"
fi
else
echo "You do not have access to $CUSTREPO"
fi
}
if [ ! -d "$FILEDIR" ]; then
mkdir -p $FILEDIR