3
# set up owner, group and permissions for system or user directories (2nd parameter)
6
DIRMOD=16893 # drwxrwxr-x
7
EXEMOD=33277 # -rwxrwxr-x
8
LINKMOD=41469 # lrwxrwxr-x
9
FILEMOD=33204 # -rw-rw-r--
11
# recursive survey of directory:
12
# ignore cvs, svn and Finder crap
13
# choose file mode depending on what kind of file we got
17
for file in `ls -1A $1`
20
CVS | .svn | .cvsignore | .cvspass | .DS_Store )
25
echo "<f n='$file' o='$OWNER' g='$GROUP' p='$DIRMOD'>"
27
echo "<mod>mode</mod>"
29
elif [ -x "$1/$file" ]
31
echo "<f n='$file' o='$OWNER' g='$GROUP' p='$EXEMOD'>"
32
echo "<mod>mode</mod>"
34
elif [ -L "$1/$file" ]
36
echo "<f n='$file' o='$OWNER' g='$GROUP' p='$LINKMOD'>"
37
echo "<mod>mode</mod>"
40
echo "<f n='$file' o='$OWNER' g='$GROUP' p='$FILEMOD'>"
41
echo "<mod>mode</mod>"
49
# output root XML and top directory, then recursively survey the directories
51
echo "<?xml version='1.0'?>"
52
echo "<pkg-contents spec='1.12'>"
53
echo "<f n='${1##*/}' o='$OWNER' g='$GROUP' p='$DIRMOD' pt='$1' m='true' t='file'>"
55
echo "<mod>mode</mod>"
57
echo "</pkg-contents>"