bpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #! /bin/sh
  2. #
  3. # Written by Marco Ciampa 2000
  4. # (a simple cut & paste from rpm vfs)
  5. # (C) 1996 The Free Software Foundation.
  6. #
  7. # Package of a new italian distribution: Bad Penguin
  8. # http://www.badpenguin.org/
  9. # override any locale for dates
  10. unset LC_ALL
  11. LC_TIME=C
  12. export LC_TIME
  13. mcbppfs_list ()
  14. {
  15. FILEPREF="-r--r--r-- 1 root root "
  16. FIEXPREF="-r-xr-xr-x 1 root root "
  17. DATE=`date +"%b %d %H:%M"`
  18. set x `ls -l "$1"`
  19. size=$6
  20. echo "$FILEPREF $size $DATE CONTENTS.tar.gz"
  21. echo "$FIEXPREF 35 $DATE INSTALL"
  22. echo "$FIEXPREF 35 $DATE UPGRADE"
  23. }
  24. mcbppfs_copyout ()
  25. {
  26. case "$2" in
  27. CONTENTS.tar.gz) cat "$1" > "$3"; exit 0;;
  28. INSTALL) echo "# Run this to install this package" > "$3"; exit 0;;
  29. UPGRADE) echo "# Run this to upgrade this package" > "$3"; exit 0;;
  30. esac
  31. }
  32. mcbppfs_run ()
  33. {
  34. case "$2" in
  35. INSTALL) echo "Installing \"$1\""; package-setup --install "$1"; exit 0;;
  36. UPGRADE) echo "Upgrading \"$1\""; package-setup --update "$1"; exit 0;;
  37. esac
  38. }
  39. umask 077
  40. case "$1" in
  41. list) mcbppfs_list "$2"; exit 0;;
  42. copyout) mcbppfs_copyout "$2" "$3" "$4"; exit 0;;
  43. run) mcbppfs_run "$2" "$3"; exit 1;;
  44. esac
  45. exit 1