blob: a6015018d31323831ed3898a951abdf5a69d66d7 (
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
|
#! /bin/sh
#
# $NetBSD: INSTALL,v 1.1 2001/11/01 00:58:01 zuntum Exp $
PKGNAME=$1
STAGE=$2
CHGRP="@CHGRP@"
CHMOD="@CHMOD@"
CHOWN="@CHOWN@"
CP="@CP@"
ECHO="@ECHO@"
SCOREDIR=/var/games
SCOREDISTDIR=${PKG_PREFIX}/share/xsoldier
SCOREFILES=" ${SCOREDISTDIR}/xsoldier.score.dist ${SCOREDIR}/xsoldier"
case ${STAGE} in
PRE-INSTALL)
;;
POST-INSTALL)
echo "Installing score files:"
${ECHO} ${SCOREFILES} | while read SAMPLEFILE FILE
do
if [ -f ${FILE} ]
then
echo " ${FILE} already exists"
else
echo " ${FILE}"
${CP} ${SAMPLEFILE} ${FILE}
${CHOWN} games ${FILE}
${CHGRP} games ${FILE}
${CHMOD} 664 ${FILE}
fi
done
;;
*)
echo "Unexpected argument: ${STAGE}"
exit 1
;;
esac
exit 0
|