# -*- shell-script -*-
-# Copyright (C) 2007 Steve Youngs <steve@sxemacs.org>
+# Copyright (C) 2007 - 2013 Steve Youngs <steve@sxemacs.org>
# What lies here is a collection of handy bash shell functions that
# make life a little easier for pkgusr.
showinst()
{
- local top=$(pinky -l $(whoami)|grep -n "^Install Notes:$"|cut -d: -f1)
- local bot=$(pinky -l $(whoami)|grep -n "^General Notes:$"|cut -d: -f1)
+ local top=$(grep -n "^Install Notes:$" ${HOME}/.project|cut -d: -f1)
+ local bot=$(grep -n "^General Notes:$" ${HOME}/.project|cut -d: -f1)
- pinky -l $(whoami)|sed -n ${top},${bot}p
+ sed -n ${top},${bot}p ${HOME}/.project
}
showgen()
{
- local top=$(pinky -l $(whoami)|grep -n "^General Notes:$"|cut -d: -f1)
- local bot=$(pinky -l $(whoami)|grep -n "^CONTENTS:$"|cut -d: -f1)
+ local top=$(grep -n "^General Notes:$" ${HOME}/.project|cut -d: -f1)
+ local bot=$(grep -n "^CONTENTS:$" ${HOME}/.project|cut -d: -f1)
- pinky -l $(whoami)|sed -n ${top},${bot}p
+ sed -n ${top},${bot}p ${HOME}/.project
+}
+
+deps()
+{
+ grep --colour 'Deps: ' ${HOME}/.project
}
listp()
srepo()
{
- pinky -l $(whoami)|grep --colour Repo_Location:.*$
+ grep --colour Repo_Location:.*$ ${HOME}/.project
}
rawrepo()
{
- srepo|awk '{print $2;}'|tr -d '<>'
+ srepo|awk '{print $2;}'|tr -d '<>'
}
trepo()
{
- pinky -l $(whoami)|grep --colour Repo_Type:.*$
+ grep --colour Repo_Type:.*$ ${HOME}/.project
}
web()
{
- pinky -l $(whoami)|grep --colour Web_Site:.*$
+ grep --colour Web_Site:.*$ ${HOME}/.project
}
rawweb()
trepo Display the type of repo (tla, git, svn, mercurial etc)
web Display the package's homepage URL.
rawweb Output just the web URL (to use with lynx etc)
+ deps Display the package's dependencies
xtar [TARBALL] Extract TARBALL, automatically choosing the appropriate
tar(1) options.
vtar [TARBALL] List the contents of TARBALL, automatically choosing