Files
macports-ports/java/dex2jar/files/patch-adjust-classpath.diff
2022-02-01 01:30:44 +01:00

41 lines
1007 B
Diff

--- d2j_invoke.sh.orig 2021-12-19 20:08:19.000000000 +0100
+++ d2j_invoke.sh 2021-12-19 20:13:39.000000000 +0100
@@ -17,32 +17,10 @@
# limitations under the License.
#
-# copy from $Tomcat/bin/startup.sh
-# resolve links - $0 may be a softlink
-PRG="$0"
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`/"$link"
- fi
+_classpath=""
+for k in "@@PREFIX@@"/lib/dex2jar/*.jar
+do
+ _classpath="${_classpath}:${k}"
done
-PRGDIR=`dirname "$PRG"`
-#
-
-_classpath="."
-if [ `uname -a | grep -i -c cygwin` -ne 0 ]; then # Cygwin, translate the path
- for k in "$PRGDIR"/lib/*.jar
- do
- _classpath="${_classpath};`cygpath -w ${k}`"
- done
-else
- for k in "$PRGDIR"/lib/*.jar
- do
- _classpath="${_classpath}:${k}"
- done
-fi
-java -Xms512m -Xmx2048m -classpath "${_classpath}" "$@"
+java -Xms512m -Xmx2048m -classpath "${_classpath:1}" "$@"