[4308] | 1 | #!/bin/sh
|
---|
| 2 |
|
---|
| 3 | dst_path=$1
|
---|
| 4 |
|
---|
| 5 | if [ ! -n "$dst_path" ] ; then
|
---|
| 6 | echo "Please specify a Directory to use as Basedirectory"
|
---|
| 7 | echo "Usage:"
|
---|
| 8 | echo " $0 <working-dir>"
|
---|
| 9 | exit -1
|
---|
| 10 | fi
|
---|
| 11 |
|
---|
| 12 | echo "copying Files to '$dst_path'"
|
---|
| 13 | package_name=openstreetmap-josm
|
---|
| 14 | dst_path=${dst_path%/}
|
---|
| 15 |
|
---|
| 16 | jar_path="$dst_path/usr/local/share/josm"
|
---|
| 17 | mkdir -p "$jar_path"
|
---|
| 18 |
|
---|
| 19 | bin_path="$dst_path/usr/bin"
|
---|
| 20 | mkdir -p "$bin_path"
|
---|
| 21 |
|
---|
| 22 | #plugin_dir="$dst_path/usr/local/share/josm/plugins"
|
---|
| 23 | plugin_dir="$dst_path/usr/lib/josm/plugins"
|
---|
| 24 | mkdir -p "$plugin_dir"
|
---|
| 25 |
|
---|
| 26 | mkdir -p "$dst_path/usr/share/josm"
|
---|
[4958] | 27 | #( # map-icons to be symlinked
|
---|
| 28 | # cd "$dst_path/usr/share/josm"
|
---|
| 29 | # ln -s ../map-icons/classic.small images
|
---|
| 30 | #)
|
---|
[4308] | 31 | mkdir -p "$dst_path/usr/lib/josm"
|
---|
[5126] | 32 |
|
---|
[4308] | 33 | # ------------------------------------------------------------------
|
---|
| 34 | # Compile the Jar Files
|
---|
[7739] | 35 | echo "------------- Compile Josm"
|
---|
[4308] | 36 | cd core
|
---|
[5156] | 37 | ant -q clean
|
---|
| 38 | ant -q compile || exit -1
|
---|
[4308] | 39 | cd ..
|
---|
| 40 |
|
---|
[7739] | 41 | echo "------------- Compile Josm Plugins"
|
---|
[4308] | 42 | cd plugins
|
---|
[5156] | 43 | ant -q clean
|
---|
| 44 | ant -q dist|| exit -1
|
---|
[4308] | 45 | cd ..
|
---|
| 46 |
|
---|
[7739] | 47 | # Compile the Josm-ng Files
|
---|
| 48 | echo "------------- Compile Josm-ng"
|
---|
| 49 | cd ../josm-ng
|
---|
| 50 | ant -q clean
|
---|
| 51 | ant -q josm-ng-impl.jar || exit -1
|
---|
| 52 | cd ../josm
|
---|
[4308] | 53 |
|
---|
[7739] | 54 |
|
---|
[4308] | 55 | # ------------------------------------------------------------------
|
---|
[7739] | 56 | echo "------------- Copy Jar Files"
|
---|
[4308] | 57 |
|
---|
| 58 | cp ./core/dist/josm-custom.jar $jar_path/josm.jar || exit -1
|
---|
[7739] | 59 | cp ../josm-ng/dist/josm-ng.jar $jar_path/josm-ng.jar || exit -1
|
---|
[4308] | 60 |
|
---|
[6101] | 61 | plugin_jars=`find dist -name "*.jar"`
|
---|
[4308] | 62 | for src_fn in $plugin_jars ; do
|
---|
| 63 | fn="`basename ${src_fn}`"
|
---|
| 64 | dst_fn="$plugin_dir/$fn"
|
---|
| 65 | echo "cp $src_fn $dst_fn"
|
---|
| 66 | cp "$src_fn" "$dst_fn" || exit -1
|
---|
| 67 | plugin_name=${fn%.jar}
|
---|
| 68 | echo $plugin_name | grep -q -e plastic_laf -e lang && continue
|
---|
| 69 | plugins="$plugins$plugin_name,"
|
---|
| 70 | done || exit -1
|
---|
| 71 |
|
---|
| 72 | # remove last empty plugin definition ,
|
---|
| 73 | plugins=${plugins%,}
|
---|
| 74 |
|
---|
| 75 | echo "Activated Plugins:"
|
---|
| 76 | echo "$plugins"
|
---|
| 77 |
|
---|
[5213] | 78 | mkdir -p "$jar_path/speller"
|
---|
| 79 | cp ../utils/planet.osm/java/speller/words.cfg "$jar_path/speller/"
|
---|
[4308] | 80 |
|
---|
| 81 | # ------------------------------------------------------------------
|
---|
[5213] | 82 | cp "debian/bin/josm.sh" "$bin_path/josm"
|
---|
[7739] | 83 | cp "debian/bin/josm-ng.sh" "$bin_path/josm-ng"
|
---|
[4308] | 84 |
|
---|
[5213] | 85 | sed "s/PLUGIN_LIST/$plugins/;" <debian/bin/preferences >"$jar_path/preferences"
|
---|
| 86 | cp nsis/bookmarks "$jar_path/bookmarks"
|
---|