summaryrefslogtreecommitdiffstats
path: root/src/vfs/extfs/helpers/bpp
blob: f71fe7e7958ad80f95c11cbc23e424cd867bdd20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#! /bin/sh
#
# Written by Marco Ciampa 2000
# (a simple cut & paste from rpm vfs)
# (C) 1996 The Free Software Foundation.
#
# Package of a new italian distribution: Bad Penguin
# http://www.badpenguin.org/

# 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    "
    DATE=`date +"%b %d %H:%M"`
    set x `ls -l "$1"`
    size=$6
    echo "$FILEPREF $size $DATE CONTENTS.tar.gz"
    echo "$FIEXPREF 35 $DATE INSTALL"
    echo "$FIEXPREF 35 $DATE UPGRADE"
}

mcbppfs_copyout ()
{
    case "$2" in
	CONTENTS.tar.gz)		cat "$1" > "$3"; exit 0;;
	INSTALL) echo "# Run this to install this package" > "$3"; exit 0;;
	UPGRADE) echo "# Run this to upgrade this package" > "$3"; exit 0;;
    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