Merge pull request #61 from samply/develop

Merge develop into main
This commit is contained in:
patrickskowronekdkfz 2023-02-24 08:35:59 +01:00 committed by GitHub
commit a036d0a88c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -14,7 +14,12 @@ else
fi
# Clone the OpenSource repository of bridgehead
bridgehead_repository_url="https://github.com/samply/bridgehead.git"
set +e
bridgehead_repository_url=$(git remote get-url origin)
if [ $? -ne 0 ]; then
bridgehead_repository_url="https://github.com/samply/bridgehead.git"
fi
set -e
if [ -d "/srv/docker/bridgehead" ]; then
current_owner=$(stat -c '%U' /srv/docker/bridgehead)
if [ "$(su -c 'git -C /srv/docker/bridgehead remote get-url origin' $current_owner)" == "$bridgehead_repository_url" ]; then
@ -26,7 +31,7 @@ if [ -d "/srv/docker/bridgehead" ]; then
else
log "INFO" "Cloning $bridgehead_repository_url to /srv/docker/bridgehead"
mkdir -p /srv/docker/
git clone bridgehead_repository_url /srv/docker/bridgehead
git clone $bridgehead_repository_url /srv/docker/bridgehead
fi
case "$PROJECT" in