aboutsummaryrefslogtreecommitdiff
path: root/src/lspkg
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-02-11 14:29:54 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-02-11 14:29:54 +0000
commitf9a8dfcd51e481a49355d94a3e74f2762519378f (patch)
tree948f0382081bd2eb8b1b5458a9661b67a090e795 /src/lspkg
parentfef31cbc9988ead081aaec587222b44ed524b6fd (diff)
downloadsimplepkg-f9a8dfcd51e481a49355d94a3e74f2762519378f.tar.gz
simplepkg-f9a8dfcd51e481a49355d94a3e74f2762519378f.tar.bz2
changed repository layout to trunk/, tags/ and branches/ scheme
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@181 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'src/lspkg')
-rwxr-xr-xsrc/lspkg88
1 files changed, 0 insertions, 88 deletions
diff --git a/src/lspkg b/src/lspkg
deleted file mode 100755
index e3add47..0000000
--- a/src/lspkg
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/bash
-#
-# lspkg v0.3: view installed and contents of slackware packages
-#
-# feedback: rhatto at riseup.net | gpl
-#
-# Lspkg is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or any later version.
-#
-# Lspkg is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place - Suite 330, Boston, MA 02111-1307, USA
-#
-
-COMMON="/usr/libexec/simplepkg/common.sh"
-
-if [ -f "$COMMON" ]; then
- source $COMMON
-else
- echo "error: file $COMMON found, check your `basename $0` installation"
- exit 1
-fi
-
-function usage {
- echo "usage: `basename $0` [option expression]"
-}
-
-if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
- usage
- echo "
-options are:
-
- -v, --view: view installed package contents
- -p, --print: print the contents of a package file
- -r, --remove: remove matching packages
- -s, --search: search a file under installed packages
- -d, --description: show matching packages' descriptions
-"
-elif [ "$1" == "-v" ] || [ "$1" == "--view" ] ; then
- if [ ! -z "$2" ]; then
- if $(ls /var/log/packages/$2* &> /dev/null); then
- for file in $(ls /var/log/packages/$2*); do
- less $file
- done
- else echo $2: package not found on /var/log/packages
- fi
- else
- usage
- exit 1
- fi
-elif [ "$1" == "-p" ] && [ "$1" == "--print" ]; then
- if [ -f "$2" ]; then
- tar ztvf $2
- else echo $2: file not found
- fi
-elif [ "$1" == "-r" ] && [ "$1" == "--remove" ]; then
- if [ ! -z "$2" ]; then
- if `ls /var/log/packages/$1* &> /dev/null`; then
- removepkg /var/log/packages/$1*
- fi
- fi
-elif [ "$1" == "-s" ] || [ "$1" == "--search" ]; then
- if [ ! -z "$2" ]; then
- grep $2 /var/log/packages/*
- fi
-elif [ "$1" == "-d" ] || [ "$1" == "--description" ]; then
- if [ ! -z "$1" ]; then
- for file in `lspkg $2`; do
- name="`package_name $file.tgz`"
- echo "package description for $name:"
- echo ""
- grep -e "^$name:" $file | sed -e "s/^$name:/ /"
- done
- else
- usage
- exit 1
- fi
-else
- if `ls /var/log/packages/$1* &> /dev/null`; then
- ls /var/log/packages/$1*
- else echo $1: package not found on /var/log/packages
- fi
-fi