Rev 1330 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1330 | Rev 1331 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #!/bin/sh |
1 | #!/bin/sh |
2 | 2 | ||
3 | # define dirs |
3 | # define dirs |
4 | build_dir="$project_dir/build" |
4 | build_dir="$project_dir/build" |
5 | 5 | ||
6 | if [ ! -d "$build_dir" ] ; then |
- | |
7 | echo "Build dir '$build_dir' not found" >> /dev/stderr |
- | |
8 | exit 1 |
- | |
9 | fi |
- | |
10 | - | ||
11 | # read meta data |
6 | # read meta data |
12 | [ -f "$common_dir/meta.xml" ] && $(xsltproc "$common_dir/meta.xsl" "$common_dir/meta.xml") |
7 | [ -f "$common_dir/meta.xml" ] && $(xsltproc "$common_dir/meta.xsl" "$common_dir/meta.xml") |
13 | [ -f "$common_dir/meta_local.xml" ] && $(xsltproc "$common_dir/meta.xsl" "$common_dir/meta_local.xml") |
8 | [ -f "$common_dir/meta_local.xml" ] && $(xsltproc "$common_dir/meta.xsl" "$common_dir/meta_local.xml") |
14 | [ -f "$project_dir/meta.xml" ] && $(xsltproc "$common_dir/meta.xsl" "$project_dir/meta.xml") |
9 | [ -f "$project_dir/meta.xml" ] && $(xsltproc "$common_dir/meta.xsl" "$project_dir/meta.xml") |
15 | [ -f "$project_dir/meta_local.xml" ] && $(xsltproc "$common_dir/meta.xsl" "$project_dir/meta_local.xml") |
10 | [ -f "$project_dir/meta_local.xml" ] && $(xsltproc "$common_dir/meta.xsl" "$project_dir/meta_local.xml") |
Line 39... | Line 34... | ||
39 | # convert paths to abs |
34 | # convert paths to abs |
40 | [ -z "${META_keyDir%%/*}" ] || META_keyDir="$project_dir/$META_keyDir" |
35 | [ -z "${META_keyDir%%/*}" ] || META_keyDir="$project_dir/$META_keyDir" |
41 | [ -z "${META_spockExec%%/*}" ] || META_spockExec="$project_dir/$META_spockExec" |
36 | [ -z "${META_spockExec%%/*}" ] || META_spockExec="$project_dir/$META_spockExec" |
42 | 37 | ||
43 | # cleanup |
38 | # cleanup |
- | 39 | mkdir -p "$build_dir" |
|
44 | rm -f "$build_dir"/* |
40 | rm -f "$build_dir"/* |
45 | 41 | ||
46 | (cd "$project_dir/src"; find . -not -path '*/.svn*' | zip -q -@ "$build_dir/$META_xpiName" ) |
42 | (cd "$project_dir/src"; find . -not -path '*/.svn*' | zip -q -@ "$build_dir/$META_xpiName" ) |
47 | 43 | ||
48 | xsltproc --stringparam dir "$project_dir" "$common_dir/update.xsl" "$project_dir/src/install.rdf" \ |
44 | xsltproc --stringparam dir "$project_dir" "$common_dir/update.xsl" "$project_dir/src/install.rdf" \ |
Line 53... | Line 49... | ||
53 | > "$build_dir/update.rdf" \ |
49 | > "$build_dir/update.rdf" \ |
54 | && rm "$build_dir/update.rdf_unsigned" |
50 | && rm "$build_dir/update.rdf_unsigned" |
55 | 51 | ||
56 | case "$META_deployMethod" in |
52 | case "$META_deployMethod" in |
57 | scp) |
53 | scp) |
58 | echo scp "$build_dir/*" "$META_webDir" |
54 | scp "$build_dir"/* "$META_webDir" |
59 | ;; |
55 | ;; |
60 | \*) |
56 | cp) |
61 | [ -z "${META_webDir%%/*}" ] || META_webDir="$project_dir/$META_webDir" |
57 | [ -z "${META_webDir%%/*}" ] || META_webDir="$project_dir/$META_webDir" |
62 | echo cp "$build_dir/*" "$META_webDir" |
58 | cp "$build_dir"/* "$META_webDir" |
- | 59 | ;; |
|
- | 60 | \*) |
|
- | 61 | echo "Unknown deployMethod" >> /dev/stderr |
|
- | 62 | exit 2 |
|
63 | ;; |
63 | ;; |
64 | esac |
64 | esac |
65 | 65 |