mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.7 KiB

  1. #!/bin/sh
  2. #
  3. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  4. #
  5. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  6. # Please add additional copyright information _after_ the line containing
  7. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  8. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  9. #
  10. # ROCK Linux: rock-src/package/base/less/lesspipe.sh
  11. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  12. #
  13. # This program is free software; you can redistribute it and/or modify
  14. # it under the terms of the GNU General Public License as published by
  15. # the Free Software Foundation; either version 2 of the License, or
  16. # (at your option) any later version. A copy of the GNU General Public
  17. # License can be found at Documentation/COPYING.
  18. #
  19. # Many people helped and are helping developing ROCK Linux. Please
  20. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  21. # file for details.
  22. #
  23. # --- ROCK-COPYRIGHT-NOTE-END ---
  24. case "$1" in
  25. # Archives
  26. *.a) ar t $1;;
  27. *.tar) tar tvf $1;;
  28. *.tgz|*.tar.gz|*.tar.[Zz]) tar tvfz $1;;
  29. *.tbz2|*.tar.bz2) tar tvfI $1;;
  30. *.zip) unzip -l $1;;
  31. # Packages
  32. *.gem) mine -p $1 ; echo -e "\nFile List:" ; mine -l $1;;
  33. *.rpm) rpm -q -i -p $1 ; echo "File List :" ; rpm -q -l -p $1;;
  34. # Manuals
  35. *ld.so.8) nroff -p -t -c -mandoc $1;;
  36. *.so.*) ;;
  37. *.[1-9]|*.[1-9][mxt]|*.[1-9]thr|*.man)
  38. nroff -p -t -c -mandoc $1;;
  39. # Compressed manuals
  40. *.[1-9].gz|*.[1-9][mxt].gz|*.[1-9]thr.gz|*.man.gz|\
  41. *.[1-9].[Zz]|*.[1-9][mxt].[Zz]|*.[1-9]thr.[Zz]|*.man.[Zz])
  42. gzip -c -d $1 | nroff -p -t -c -mandoc;;
  43. *.[1-9].bz2|*.[1-9][mxt].bz2|*.[1-9]thr.bz2|*.man.bz2)
  44. bzip2 -c -d $1 | nroff -p -t -c -mandoc ;;
  45. # Compressed files
  46. *.gz|*.Z|*.z) gzip -c -d $1;;
  47. *.bz2) bzip2 -c -d $1;;
  48. esac