index : asp32 | |
Archlinux32 fork of asp - obsolete | gitolite user |
summaryrefslogtreecommitdiff |
author | Dave Reisner <dreisner@archlinux.org> | 2014-08-01 10:05:14 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2014-08-01 10:05:14 -0400 |
commit | b4bd7fe863a1801e58a17c619737484848e2c0ca (patch) | |
tree | 7321b1acd1f5db7fa6538b394adcd2e0c2778c3b /asp.in | |
parent | 58ce3499676cea818f2e49bbc3a5bf33a71ac964 (diff) |
-rw-r--r-- | asp.in | 7 |
@@ -71,7 +71,7 @@ version() { printf 'asp v0\n' } -update() { +update_all() { local r for r in "${ARCH_GIT_REPOS[@]}"; do @@ -84,11 +84,13 @@ update_packages() { local refspecs=() remote pkgname declare -A refspec_map + # map packages to remotes for pkgname; do package_init -n "$pkgname" remote || return 1 refspec_map["$remote"]+=" packages/$pkgname" done + # update each remote all at once for remote in "${!refspec_map[@]}"; do read -ra refspecs <<<"${refspec_map["$remote"]}" remote_update_refs "$remote" "${refspecs[@]}" @@ -118,7 +120,6 @@ initialize() { git init || return 1 for remote in "${ARCH_GIT_REPOS[@]}"; do - rm -rf "$remote" git remote add "$remote" git://projects.archlinux.org/svntogit/"$remote".git done @@ -222,7 +223,7 @@ shift case $action in update) if (( $# == 0 )); then - update + update_all else update_packages "$@" fi |