Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-tools.git;a=commitdiff;h=acfdd0a53b53657884aac91c55d39a22bca07430

commit acfdd0a53b53657884aac91c55d39a22bca07430
Author: James Buren <r...@frugalware.org>
Date:   Mon Apr 19 18:31:11 2010 -0500

pkgcd.sh: initial import (shell include to quickly change pkg dirs)

diff --git a/pkgcd.sh b/pkgcd.sh
new file mode 100644
index 0000000..fca2157
--- /dev/null
+++ b/pkgcd.sh
@@ -0,0 +1,28 @@
+pkgcd() {
+       local repo pkg
+
+       if [ -z $1 ]; then
+               echo "Usage: pkgcd <package>"
+               echo "Usage: pkgcd <repo> <package>"
+               return
+       fi
+
+       if [ -z $2 ]; then
+               repo=current
+               pkg=$1
+       else
+               repo=$1
+               pkg=$2
+       fi
+
+       source ~/.repoman.conf
+
+       [ $? -ne 0 ] && return
+
+       if [ -z $fst_root ]; then
+               echo "fst_root from $HOME/.repoman.conf is not defined."
+               return
+       fi
+
+       cd $fst_root/$repo/source/*/$pkg
+}
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to