Rev 1331 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#!/bin/sh
# define dirs
build_dir="$project_dir/build"
# read meta data
[ -f "$common_dir/meta.xml" ] && $(xsltproc "$common_dir/meta.xsl" "$common_dir/meta.xml")
[ -f "$common_dir/meta_local.xml" ] && $(xsltproc "$common_dir/meta.xsl" "$common_dir/meta_local.xml")
[ -f "$project_dir/meta.xml" ] && $(xsltproc "$common_dir/meta.xsl" "$project_dir/meta.xml")
[ -f "$project_dir/meta_local.xml" ] && $(xsltproc "$common_dir/meta.xsl" "$project_dir/meta_local.xml")
$(xsltproc "$common_dir/id.xsl" "$project_dir/src/install.rdf")
if [ -z "$META_xpiName" ] ; then
echo "xpiName not defined in meta.xml" >> /dev/stderr
exit 2
fi
if [ -z "$META_webDir" ] ; then
echo "webDir not defined in meta.xml" >> /dev/stderr
exit 2
fi
if [ -z "$META_id" ] ; then
echo "id of the exception is unknown" >> /dev/stderr
exit 2
fi
# cleanup
mkdir -p "$build_dir"
rm -f "$build_dir"/*
(cd "$project_dir/src"; find . -not -path '*/.svn*' | zip -q -@ "$build_dir/$META_xpiName" )
xsltproc --stringparam dir "$project_dir" "$common_dir/update.xsl" "$project_dir/src/install.rdf" \
> "$build_dir/update.rdf"
case "$META_deployMethod" in
scp)
scp "$build_dir"/* "$META_webDir"
;;
cp)
[ -z "${META_webDir%%/*}" ] || META_webDir="$project_dir/$META_webDir"
cp "$build_dir"/* "$META_webDir"
;;
\*)
echo "Unknown deployMethod" >> /dev/stderr
exit 2
;;
esac