mirror of
https://github.com/chocolate-doom/chocpkg.git
synced 2024-11-10 07:11:39 +00:00
Do a git pull instead of git clone when appropriate.
When building a git package, invoke git pull if we already did a previous build and have the checkout already.
This commit is contained in:
parent
b3bce89f50
commit
3ad8b4a563
1 changed files with 6 additions and 1 deletions
|
@ -9,6 +9,11 @@ fetch_git::init() {
|
|||
}
|
||||
|
||||
do_fetch() {
|
||||
git clone -b "$GIT_BRANCH" "$GIT_URL" "$PACKAGE_BUILD_DIR"
|
||||
if [ -e "$PACKAGE_BUILD_DIR/.git" ]; then
|
||||
cd "$PACKAGE_BUILD_DIR"
|
||||
git pull
|
||||
else
|
||||
git clone -b "$GIT_BRANCH" "$GIT_URL" "$PACKAGE_BUILD_DIR"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue