source: osm/applications/editors/josm/debian/make_install_files.sh@ 7719

Last change on this file since 7719 was 6101, checked in by joerg, 17 years ago

josm: move plugins/dist directory one level up

  • Property svn:executable set to *
File size: 1.8 KB
RevLine 
[4308]1#!/bin/sh
2
3dst_path=$1
4
5if [ ! -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
10fi
11
12echo "copying Files to '$dst_path'"
13package_name=openstreetmap-josm
14dst_path=${dst_path%/}
15
16jar_path="$dst_path/usr/local/share/josm"
17mkdir -p "$jar_path"
18
19bin_path="$dst_path/usr/bin"
20mkdir -p "$bin_path"
21
22#plugin_dir="$dst_path/usr/local/share/josm/plugins"
23plugin_dir="$dst_path/usr/lib/josm/plugins"
24mkdir -p "$plugin_dir"
25
26mkdir -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]31mkdir -p "$dst_path/usr/lib/josm"
[5126]32
[4308]33# ------------------------------------------------------------------
34# Compile the Jar Files
35echo "Compile Josm"
36cd core
[5156]37ant -q clean
38ant -q compile || exit -1
[4308]39cd ..
40
41echo "Compile Josm Plugins"
42cd plugins
[5156]43ant -q clean
44ant -q dist|| exit -1
[4308]45cd ..
46
47
48# ------------------------------------------------------------------
49# Copy Jar Files
50
51cp ./core/dist/josm-custom.jar $jar_path/josm.jar || exit -1
52
[6101]53plugin_jars=`find dist -name "*.jar"`
[4308]54for src_fn in $plugin_jars ; do
55 fn="`basename ${src_fn}`"
56 dst_fn="$plugin_dir/$fn"
57 echo "cp $src_fn $dst_fn"
58 cp "$src_fn" "$dst_fn" || exit -1
59 plugin_name=${fn%.jar}
60 echo $plugin_name | grep -q -e plastic_laf -e lang && continue
61 plugins="$plugins$plugin_name,"
62done || exit -1
63
64# remove last empty plugin definition ,
65plugins=${plugins%,}
66
67echo "Activated Plugins:"
68echo "$plugins"
69
[5213]70mkdir -p "$jar_path/speller"
71cp ../utils/planet.osm/java/speller/words.cfg "$jar_path/speller/"
[4308]72
73# ------------------------------------------------------------------
[5213]74cp "debian/bin/josm.sh" "$bin_path/josm"
[4308]75
[5213]76sed "s/PLUGIN_LIST/$plugins/;" <debian/bin/preferences >"$jar_path/preferences"
77cp nsis/bookmarks "$jar_path/bookmarks"
Note: See TracBrowser for help on using the repository browser.