aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/linux_tools/package-client.sh
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/linux_tools/package-client.sh')
-rwxr-xr-xlinden/indra/newview/linux_tools/package-client.sh133
1 files changed, 0 insertions, 133 deletions
diff --git a/linden/indra/newview/linux_tools/package-client.sh b/linden/indra/newview/linux_tools/package-client.sh
deleted file mode 100755
index b054386..0000000
--- a/linden/indra/newview/linux_tools/package-client.sh
+++ /dev/null
@@ -1,133 +0,0 @@
1#!/bin/sh
2MANIFEST=$1
3PACKAGE_NAME=$2
4GRID=$3
5
6# Check that the entire client manifest is there.
7cd newview
8echo Checking manifest...
9
10# Strip out comment lines and empty lines
11# Replace anything with a source,dest pairs with just source filename
12if ! ls -d `cat "$MANIFEST" | \
13 grep -v ^# | grep -v ^$ | \
14 sed 's/,.*//'` 1>/dev/null
15then
16 echo Client manifest defined in newview/$MANIFEST is not complete.
17 exit 1
18fi
19echo "Done."
20
21# See if the package already exists.
22BUILD_PACKAGE=YES
23if [ -a $PACKAGE_NAME ]
24then
25 echo The directory "newview/$PACKAGE_NAME" already exists.
26 echo Checking for complete client manifest...
27
28 cd $PACKAGE_NAME
29
30 # Strip out comment lines and empty lines
31 # Replace source,dest pairs with just dest filename
32 if ls -d `cat "../$MANIFEST" | \
33 grep -v ^# | grep -v ^$ | \
34 sed 's/.*,\(.*\)/\1/'` 1>/dev/null
35 then
36 echo "Done."
37 echo Package at "newview/$PACKAGE_NAME" looks complete.
38 cd ..
39 BUILD_PACKAGE=NO
40 else
41 echo Incomplete package at "newview/$PACKAGE_NAME"!
42 echo Removing corrupt package...
43 cd ..
44 rm -rf $PACKAGE_NAME
45 echo Done.
46 fi
47fi
48
49echo Building newview/$PACKAGE_NAME directory...
50## First read all directories mentioned in the manifest, and create a package skeleton.
51
52# Strip out comment lines and empty lines
53# Replace source,dest pairs with just dest filename
54# Strip out and line that does not include a directory in its path (ie contains a '/')
55# Extract everything up to the last '/' and prefix with $PACKAGE_NAME
56# Print out just the unique directores, and make them.
57mkdir -p `cat $MANIFEST | \
58 grep -v ^# | \
59 grep -v ^$ | \
60 sed 's/.*,\(.*\)/\1/' | \
61 grep \/ | \
62 sed "s/\(^.*\)\/[^\/]*/$PACKAGE_NAME\/\1/" | \
63 sort | uniq`
64
65## Copy the manifest.
66
67# Strip out comment lines and empty lines
68# Strip out empty directories
69# Replace any line without a ',' with 'line,line'
70for pair in `cat $MANIFEST | \
71 grep -v ^# | \
72 grep -v ^$ | \
73 grep -v \/$ | \
74 sed 's/\(^[^,]*$\)/\1,\1/' `
75do
76 # $pair is 'source,dest' ... split it up
77 SOURCE=`echo "$pair" | awk -F, '{ print $1; }'`
78 DEST=`echo "$pair" | awk -F, '{ print $2; }'`
79 # If this is a wildcard copy (pair contains a '*'), then remove the wildcard from $DEST
80 # and make the copy recursive
81 RECURSE=""
82 if [ ! x == x`echo "$SOURCE" | grep \*$` ]
83 then
84 DEST=`echo "$DEST" | sed 's/\*$//'`
85 RECURSE="-R"
86 fi
87 # The -a makes us copy links as links, plus timestamps etc.
88 cp -a $RECURSE $SOURCE "$PACKAGE_NAME/$DEST"
89done
90
91echo Done.
92
93## Clean up any CVS directories that might have been recursively included.
94echo Pruning CVS directories from newview/$PACKAGE_NAME directory...
95find $PACKAGE_NAME -type d -name CVS -exec rm -rf {} \; 2>/dev/null
96echo "Done removing CVS directories."
97
98## Clean up any SVN directories that might have been recursively included.
99echo Pruning .svn directories from newview/$PACKAGE_NAME directory...
100find $PACKAGE_NAME -type d -name \.svn -exec rm -rf {} \; 2>/dev/null
101echo "Done removing .svn directories."
102
103# Create an appropriate gridargs.dat for this package, denoting required grid.
104if [ X$GRID == X'default' ]
105then
106 echo 'Default grid - creating empty gridargs.dat'
107 echo " " > $PACKAGE_NAME/gridargs.dat
108else
109 if [ X$GRID == X'firstlook' ]
110 then
111 # firstlook is a special case... it's not really a grid.
112 echo "Creating gridargs.dat for firstlook"
113 echo "-settings settings_firstlook.xml" > $PACKAGE_NAME/gridargs.dat
114 else
115 echo "Creating gridargs.dat for package, grid $GRID"
116 echo "-settings settings_beta.xml --${GRID} -helperuri http://preview-${GRID}.secondlife.com/helpers/" > $PACKAGE_NAME/gridargs.dat
117 fi
118fi
119
120TARBALL=$PACKAGE_NAME.tar.bz2
121
122# See if the tarball already exists.
123if [ -a $TARBALL ]
124then
125 echo Tarball "newview/$TARBALL" already exists. Skipping tarball creation.
126 exit 0
127fi
128
129echo Creating tarball "newview/$TARBALL"...
130# --numeric-owner hides the username of the builder for security etc.
131tar --numeric-owner -cjf $TARBALL $PACKAGE_NAME
132echo Done.
133