Index: /applications/editors/josm/nsis/josm-setup-unix.sh
===================================================================
--- /applications/editors/josm/nsis/josm-setup-unix.sh	(revision 17705)
+++ /applications/editors/josm/nsis/josm-setup-unix.sh	(revision 17706)
@@ -22,4 +22,6 @@
     # as described above
     LAUNCH4J="java -jar /usr/share/launch4j/launch4j.jar"
+elif [ -s ../launch4j/launch4j.jar ]; then
+    LAUNCH4J="java -jar ../launch4j/launch4j.jar"
 else
     # launch4j installed locally under this nsis folder
@@ -34,14 +36,21 @@
 else
     # UNIX like
-    MAKENSIS=makensis
+    MAKENSIS=/usr/bin/makensis
 fi
 echo Using NSIS: $MAKENSIS
 
-svncorerevision=`svnversion ../core`
-svnpluginsrevision=`svnversion ../plugins`
-svnrevision="$svncorerevision-$svnpluginsrevision"
+if [ -n "$1" ]; then
+  export VERSION=$1
+  export JOSM_BUILD="no"
+  export WEBKIT_DOWNLAD="no"
+else
+  svncorerevision=`svnversion ../core`
+  svnpluginsrevision=`svnversion ../plugins`
+  svnrevision="$svncorerevision-$svnpluginsrevision"
 
-#export VERSION=latest
-export VERSION=custom-${svnrevision}                                         
+  export VERSION=custom-${svnrevision}
+  export JOSM_BUILD="yes"
+  export WEBKIT_DOWNLOAD="yes"
+fi
 
 echo "Creating Windows Installer for josm-$VERSION"
@@ -50,5 +59,7 @@
 echo "##################################################################"
 echo "### Download and unzip the webkit stuff"
-wget --continue --timestamping http://josm.openstreetmap.de/download/windows/webkit-image.zip
+if [ "x$WEBKIT_DOWNLOAD" == "xyes" ]; then
+    wget --continue --timestamping http://josm.openstreetmap.de/download/windows/webkit-image.zip
+fi
 mkdir -p webkit-image
 cd webkit-image
@@ -59,5 +70,5 @@
 echo "##################################################################"
 echo "### Build the Complete josm + Plugin Stuff"
-if true; then
+if [ "x$JOSM_BUILD" == "xyes" ]; then
     (
 	echo "Build the Complete josm Stuff"
@@ -82,5 +93,5 @@
 # launch4j - http://launch4j.sourceforge.net/
 # delete old exe file first
-rm -f josm.exe
+/bin/rm -f josm.exe
 $LAUNCH4J "launch4j.xml"
 
@@ -98,4 +109,4 @@
 
 # keep the intermediate file, for debugging
-rm -f josm-intermediate.exe
-mv josm.exe josm-intermediate.exe
+/bin/rm josm-intermediate.exe 2>/dev/null >/dev/null
+/bin/mv josm.exe josm-intermediate.exe 2>/dev/null >/dev/null
