Skip to content

Commit 0cb56e8

Browse files
authored
Merge pull request #19 from jendo42/devel
scripts: fixed updating repo to source ref
2 parents c35ac85 + 4fc8532 commit 0cb56e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/001-binutils.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ fi
2525
if test ! -d "$REPO_FOLDER"; then
2626
git clone --depth 1 -b "$REPO_REF" "$REPO_URL" "$REPO_FOLDER"
2727
else
28-
git -C "$REPO_FOLDER" fetch origin
29-
git -C "$REPO_FOLDER" reset --hard "origin/$REPO_REF"
30-
git -C "$REPO_FOLDER" checkout "$REPO_REF"
28+
git -C "$REPO_FOLDER" remote set-url origin "$REPO_URL"
29+
git -C "$REPO_FOLDER" fetch origin "$REPO_REF" --depth=1
30+
git -C "$REPO_FOLDER" checkout -f "$REPO_REF"
3131
fi
3232

3333
cd "$REPO_FOLDER"

0 commit comments

Comments
 (0)