mirror of
https://github.com/libretro/libretro-super.git
synced 2024-11-30 11:30:50 +00:00
libretro-buildbot-recipe.sh: Switch repos for new urls.
If the current remote url is different from the new url in the recipe it will now remove the old repo and clone the new url before building.
This commit is contained in:
parent
38d05a1e32
commit
fb910708bc
@ -612,7 +612,14 @@ while read line; do
|
||||
{ echo "git directory broken, removing $DIR and skipping $NAME."; \
|
||||
rm -rfv -- "$DIR" && continue; }
|
||||
|
||||
if [ -z "${NOCLEAN}" ]; then
|
||||
OLDURL="$(git --work-tree="$DIR" --git-dir="$DIR/.git" config --get remote.origin.url)"
|
||||
|
||||
if [ "$URL" != "$OLDURL" ]; then
|
||||
rm -rvf -- "$DIR"
|
||||
echo "cloning repo $URL..."
|
||||
git clone --depth=1 -b "$GIT_BRANCH" "$URL" "$DIR"
|
||||
BUILD="YES"
|
||||
elif [ -z "${NOCLEAN}" ]; then
|
||||
echo "fetching changes from repo $URL..."
|
||||
git --work-tree="$DIR" --git-dir="$DIR/.git" fetch --depth 1 origin "${GIT_BRANCH}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user