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
#!/bin/sh
fatal()
{
echo "FATAL: $*" >&2
exit 1
}
if [ "$1" = "--remove" ] ; then
epm remove $PKGNAME
exit
fi
if [ "$1" = "--package" ] ; then
echo "$PKGNAME"
exit
fi
if [ "$1" = "--installed" ] ; then
epm installed $PKGNAME
exit
fi
if [ "$1" = "--description" ] ; then
echo "$DESCRIPTION"
exit
fi
[ "$1" != "--run" ] && [ "$1" != "--update" ] && fatal "Unknown command $1"
if [ "$1" = "--update" ] ; then
if ! epm installed $PKGNAME ; then
echo "Skipping update of $PKGNAME (package is not installed)"
exit
fi
fi