summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Woudstra2023-08-29 12:25:21 +0200
committerEric Woudstra2023-08-29 12:25:21 +0200
commitd9952ecb43fc40632e7f63616cea6fa902b97006 (patch)
tree275c4c1bb2732a397035628e23a4bde860174b08
parent24a722f4bdce035a0ca83f4068d09a61ad786e17 (diff)
downloadaur-d9952ecb43fc40632e7f63616cea6fa902b97006.tar.gz
Improve git function
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD12
2 files changed, 4 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d357dfbda23c..2b52808b9366 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = linux-bpir64-git
pkgver = 6.3.9.bpi
- pkgrel = 3
+ pkgrel = 4
url = http://www.kernel.org/
arch = aarch64
license = GPL2
diff --git a/PKGBUILD b/PKGBUILD
index 4da44101ea51..8094dbf84433 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -20,7 +20,7 @@ _gitroot="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux"
_kernelname=${pkgbase#linux}
_desc="AArch64 kernel for BPI-R64 and BPI-R3"
pkgver=6.3.9.bpi
-pkgrel=3
+pkgrel=4
arch=('aarch64')
url="http://www.kernel.org/"
license=('GPL2')
@@ -49,21 +49,15 @@ export LOCALVERSION=""
prepare() {
if [[ -d "${srcdir}/${_srcname}/" ]]; then
cd "${srcdir}/${_srcname}/"
- git fetch --depth 1
+ git fetch --all
echo "LOCAL HEAD: $(git rev-parse HEAD)"
echo "REMOTE HEAD: $(git rev-parse @{u})"
if [ "$(git rev-parse HEAD)" != "$(git rev-parse @{u})" ]; then
- git reset --hard
-# git pull --depth=1 --rebase=true --force origin "${_gitbranch}:${_gitbranch}"
- git pull --depth=1 --ff-only --force origin "${_gitbranch}:${_gitbranch}"
- git checkout "${_gitbranch}"
+ git reset --hard "origin/${_gitbranch}"
fi
- echo
else
cd "${srcdir}/"
- echo git clone --branch "${_gitbranch}" --depth=1 "${_gitroot}" "${srcdir}/${_srcname}/"
git clone --branch "${_gitbranch}" --depth=1 "${_gitroot}" "${srcdir}/${_srcname}/"
- echo
fi
cd "${srcdir}/${_srcname}/"