diff --git a/rebuild.sh b/rebuild.sh index f5c8e26..9c91823 100755 --- a/rebuild.sh +++ b/rebuild.sh @@ -25,6 +25,7 @@ build_package() { local install_as local makepkg_args="-srLcCf --noconfirm" local pull_url="https://aur.archlinux.org/$pkg.git" + local branch while (( $# )) do @@ -37,6 +38,10 @@ build_package() { pull_url=$2 shift 2 ;; + --branch) + branch=-b "$2" + shift 2 + ;; --install-as) install_as=$2 shift 2 @@ -54,7 +59,7 @@ build_package() { if [[ ! -d ~/bin/$pkg ]] then - git clone "$pull_url" + git clone "$branch" "$pull_url" fi cd "$pkg" || exit_on_err