diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-05-21 17:02:48 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-05-21 17:02:48 +0200 |
commit | 1157832dffda67049384f2fc57c6312e3e6834d2 (patch) | |
tree | b4616369435c38ea0876bc8f3f566e6f86f76402 /bin | |
parent | 518b9a107ef971ba2ce8c0c8f71e2c3e7dc77f4a (diff) |
bin/pkg: Added function 'changesrc' to change all packages' source URLs
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pkg | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -81,8 +81,18 @@ pkg_update () { } } +pkg_changesrc () { + cd $PDIR + for i in *(/); { + if [ -f $i/.hg/hgrc ]; then + sed -ri "s!(default = )[^:]*://[^/]*/!\1$1/!" $i/.hg/hgrc + fi + } +} + case "$1" in add) pkg_add "$2" ;; - update) pkg_update ;; + changeroot) pkg_changesrc "$2" ;; remove) pkg_remove "$2" ;; + update) pkg_update ;; esac |