Rev 1331 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1330 | dev | 1 | #!/bin/sh |
2 | |||
3 | # define dirs |
||
4 | build_dir="$project_dir/build" |
||
5 | |||
6 | # read meta data |
||
7 | [ -f "$common_dir/meta.xml" ] && $(xsltproc "$common_dir/meta.xsl" "$common_dir/meta.xml") |
||
8 | [ -f "$common_dir/meta_local.xml" ] && $(xsltproc "$common_dir/meta.xsl" "$common_dir/meta_local.xml") |
||
9 | [ -f "$project_dir/meta.xml" ] && $(xsltproc "$common_dir/meta.xsl" "$project_dir/meta.xml") |
||
10 | [ -f "$project_dir/meta_local.xml" ] && $(xsltproc "$common_dir/meta.xsl" "$project_dir/meta_local.xml") |
||
11 | $(xsltproc "$common_dir/id.xsl" "$project_dir/src/install.rdf") |
||
12 | |||
13 | if [ -z "$META_xpiName" ] ; then |
||
14 | echo "xpiName not defined in meta.xml" >> /dev/stderr |
||
15 | exit 2 |
||
16 | fi |
||
17 | if [ -z "$META_webDir" ] ; then |
||
18 | echo "webDir not defined in meta.xml" >> /dev/stderr |
||
19 | exit 2 |
||
20 | fi |
||
21 | if [ -z "$META_id" ] ; then |
||
22 | echo "id of the exception is unknown" >> /dev/stderr |
||
23 | exit 2 |
||
24 | fi |
||
25 | |||
26 | # cleanup |
||
1331 | dev | 27 | mkdir -p "$build_dir" |
1330 | dev | 28 | rm -f "$build_dir"/* |
29 | |||
30 | (cd "$project_dir/src"; find . -not -path '*/.svn*' | zip -q -@ "$build_dir/$META_xpiName" ) |
||
31 | |||
32 | xsltproc --stringparam dir "$project_dir" "$common_dir/update.xsl" "$project_dir/src/install.rdf" \ |
||
1425 | dev | 33 | > "$build_dir/update.rdf" |
1330 | dev | 34 | |
35 | case "$META_deployMethod" in |
||
36 | scp) |
||
1331 | dev | 37 | scp "$build_dir"/* "$META_webDir" |
1330 | dev | 38 | ;; |
1331 | dev | 39 | cp) |
1330 | dev | 40 | [ -z "${META_webDir%%/*}" ] || META_webDir="$project_dir/$META_webDir" |
1331 | dev | 41 | cp "$build_dir"/* "$META_webDir" |
1330 | dev | 42 | ;; |
1331 | dev | 43 | \*) |
44 | echo "Unknown deployMethod" >> /dev/stderr |
||
45 | exit 2 |
||
46 | ;; |
||
1330 | dev | 47 | esac |
48 |