-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathcreateZip.sh
More file actions
executable file
·30 lines (24 loc) · 819 Bytes
/
createZip.sh
File metadata and controls
executable file
·30 lines (24 loc) · 819 Bytes
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
zipBasePath="{TARGET_BUILD_DIR}/${ZipName}"
echo "Removing zip file ${zipBasePath}.zip"
rm -f "${zipBasePath}.zip"
if [ x${ACTION} = xclean ]; then
exit 0
fi
echo "Removing .svn directories..."
find "${BUILT_PRODUCTS_DIR}/${ZipProduct}" -name ".svn" -exec rm -rvf "{}" \;
echo "...done"
echo "Setting ownership..."
chgrp -R admin "${BUILT_PRODUCTS_DIR}/${ZipProduct}"
echo "...done"
echo "Setting permissions..."
chmod -R g+w "${BUILT_PRODUCTS_DIR}/${ZipProduct}"
echo "...done"
echo "Creating Zip file ${zipBasePath}.zip ..."
cd "${BUILT_PRODUCTS_DIR}"
zip -9 -r -y "${ZipName}.zip" "${ZipProduct}"
echo "...done"
echo "Adding Revision Number to Zip file ${zipBasePath}.zip ..."
REV=`/usr/bin/env svnversion -n "${SRCROOT}"`
cd "${BUILT_PRODUCTS_DIR}"
cp "${ZipName}.zip" "${ZipName}-${REV}.zip"
echo "...done"