aur.sh: Rebase local changes by default

master
Taeyeon Mori 8 years ago
parent bb01ef01c3
commit ddbe02a9e2
  1. 8
      bin/aur.sh

@ -184,10 +184,14 @@ aur_get_old() {
curl "$AUR_HOST/packages/${1:0:2}/$1/$1.tar.gz" | tar xz curl "$AUR_HOST/packages/${1:0:2}/$1/$1.tar.gz" | tar xz
} }
[[ -z "$AUR_GIT_OPTIONS" ]] && AUR_GIT_OPTIONS=()
[[ -z "$AUR_GIT_PULL_OPTIONS" ]] && AUR_GIT_PULL_OPTIONS=(--rebase)
[[ -z "$AUR_GIT_CLONE_OPTIONS" ]] && AUR_GIT_CLONE_OPTIONS=()
aur_get_aur4() { aur_get_aur4() {
if [ -d "$1/.git" ]; then ( if [ -d "$1/.git" ]; then (
cd "$1" cd "$1"
git pull git "${AUR_GIT_OPTIONS[@]}" pull "${AUR_GIT_PULL_OPTIONS[@]}"
) else ) else
if [ -e "$1" ]; then if [ -e "$1" ]; then
warn "$1 PKGBUILD directory exists but is not a git clone." warn "$1 PKGBUILD directory exists but is not a git clone."
@ -196,7 +200,7 @@ aur_get_aur4() {
[ "$ans" = "y" ] || [ "$ans" = "yes" ] || [ "$ans" = "Y" ] || return 32 [ "$ans" = "y" ] || [ "$ans" = "yes" ] || [ "$ans" = "Y" ] || return 32
rm -rf "$1" rm -rf "$1"
fi fi
git clone "$AUR_HOST/$1.git" "$1" git "${AUR_GIT_OPTIONS[@]}" clone "${AUR_GIT_CLONE_OPTIONS[@]}" -- "$AUR_HOST/$1.git" "$1"
fi fi
} }

Loading…
Cancel
Save