diff options
author | Eric Woudstra | 2023-08-29 12:25:21 +0200 |
---|---|---|
committer | Eric Woudstra | 2023-08-29 12:25:21 +0200 |
commit | d9952ecb43fc40632e7f63616cea6fa902b97006 (patch) | |
tree | 275c4c1bb2732a397035628e23a4bde860174b08 | |
parent | 24a722f4bdce035a0ca83f4068d09a61ad786e17 (diff) | |
download | aur-d9952ecb43fc40632e7f63616cea6fa902b97006.tar.gz |
Improve git function
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 12 |
2 files changed, 4 insertions, 10 deletions
@@ -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 @@ -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}/" |