From 1157832dffda67049384f2fc57c6312e3e6834d2 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 21 May 2008 17:02:48 +0200 Subject: bin/pkg: Added function 'changesrc' to change all packages' source URLs --- bin/pkg | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'bin/pkg') diff --git a/bin/pkg b/bin/pkg index 15d2d1c..ccdfa07 100755 --- a/bin/pkg +++ b/bin/pkg @@ -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 -- cgit v1.2.3