2 backupdir
=`mktemp -d /tmp/josm-plugins.XXXXXXXXXX`
3 cp -r ~
/.josm
/plugins
$backupdir
4 echo Backup is
in $backupdir. Press Enter to
continue, Ctrl-C to cancel
7 for jarfile
in `find ~/.josm/plugins -iname '*.jar'`; do
8 tempdir
=`mktemp -d /tmp/josm-smallscreen.XXXXXXXXXX`
10 echo Processing
$jarfile in $tempdir
13 if [ -e josm-smallscreen
]; then
14 echo Already processed. Skipping...
17 for image
in `find -iname '*.png'`; do
18 size
=`identify $image | cut -f 3 -d ' ' | cut -f 1 -d x`
19 if [ $size -ge 24 -a $size -le 48 ]; then
20 echo Resizing
$image "(was $size)"
21 convert
$image -resize 60% $image
25 touch josm-smallscreen
27 # Create unsigned jar-file
28 sed '/^\s\?$/q' -i META-INF
/MANIFEST.MF
# remove all but first paragraph
29 rm -f META-INF
/*.RSA META-INF
/*.SF
31 fastjar
-cfm $jarfile META-INF
/MANIFEST.MF
*