2000-10-27 06:28:42 +04:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
|
|
|
# Written by Marco Ciampa 2000
|
|
|
|
# (a simple cut & paste from rpm vfs)
|
|
|
|
# (C) 1996 The Free Software Foundation.
|
|
|
|
#
|
2002-12-09 08:01:02 +03:00
|
|
|
# Package of a new italian distribution: Bad Penguin
|
|
|
|
# http://www.badpenguin.org/
|
2000-10-27 06:28:42 +04:00
|
|
|
|
|
|
|
# override any locale for dates
|
|
|
|
unset LC_ALL
|
|
|
|
LC_TIME=C
|
|
|
|
export LC_TIME
|
|
|
|
|
|
|
|
mcbppfs_list ()
|
|
|
|
{
|
|
|
|
FILEPREF="-r--r--r-- 1 root root "
|
|
|
|
FIEXPREF="-r-xr-xr-x 1 root root "
|
2002-12-09 08:01:02 +03:00
|
|
|
DATE=`date +"%b %d %H:%M"`
|
2006-07-26 00:22:59 +04:00
|
|
|
set x `ls -l "$1"`
|
2002-12-09 08:01:02 +03:00
|
|
|
size=$6
|
|
|
|
echo "$FILEPREF $size $DATE CONTENTS.tar.gz"
|
|
|
|
echo "$FIEXPREF 35 $DATE INSTALL"
|
|
|
|
echo "$FIEXPREF 35 $DATE UPGRADE"
|
2000-10-27 06:28:42 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
mcbppfs_copyout ()
|
|
|
|
{
|
|
|
|
case "$2" in
|
|
|
|
CONTENTS.tar.gz) cat "$1" > "$3"; exit 0;;
|
2002-12-09 08:01:02 +03:00
|
|
|
INSTALL) echo "# Run this to install this package" > "$3"; exit 0;;
|
|
|
|
UPGRADE) echo "# Run this to upgrade this package" > "$3"; exit 0;;
|
2000-10-27 06:28:42 +04:00
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
mcbppfs_run ()
|
|
|
|
{
|
|
|
|
case "$2" in
|
|
|
|
INSTALL) echo "Installing \"$1\""; package-setup --install "$1"; exit 0;;
|
|
|
|
UPGRADE) echo "Upgrading \"$1\""; package-setup --update "$1"; exit 0;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
umask 077
|
|
|
|
case "$1" in
|
|
|
|
list) mcbppfs_list "$2"; exit 0;;
|
|
|
|
copyout) mcbppfs_copyout "$2" "$3" "$4"; exit 0;;
|
|
|
|
run) mcbppfs_run "$2" "$3"; exit 1;;
|
|
|
|
esac
|
|
|
|
exit 1
|