#!/bin/bash # generate .lst file for aspectjtools.jar # by compile all non-testing src dirs # todo: copy ajbrowser manifest [ -n "$DEBUG" ] && set -vx usage() { name=`basename "$0"` cat< aspectjtools-sources.lst; # head aspectjtools-sources.lst } genResourceJar() { # slow, but hey [ -n "$DEBUG" ] && set -vx jarFile=`canonicalPath "$1"` [ -n "$jarFile" ] || exit 43 "${JAVA_HOME:-c:/home/apps/jdk14}/bin/"jar \ cfM "$jarFile" build.xml curDir=`pwd`; for i in `listSourceDirs` ; do cd "$i" "${JAVA_HOME:-c:/home/apps/jdk14}/bin/"jar \ ufM "$jarFile" `find . -type f | sed '/CVS/d;/\.java/d'` cd "$curDir" done cd "$curDir" # mf=`canonicalPath "grj_manifest.txt"` # sed 's|@build.version.short@|1.1.1|;s|@company.name@|na|' \ # ../ajbrowser/ajbrowser.mf.txt > "$mf" # "${JAVA_HOME:-c:/home/apps/jdk14}/bin/"jar \ # ufm "$jarFile" "$mf" build.xml # rm "$mf" } addManifest() { outjar="$1" mf=`canonicalPath "grj_manifest.txt"` sed 's|@build.version.short@|1.1.1|;s|@company.name@|na|' \ ../ajbrowser/ajbrowser.mf.txt > "$mf" echo "nothing" > am_nothing "${JAVA_HOME:-c:/home/apps/jdk14}/bin/"jar \ ufm "$outjar" "$mf" am_nothing rm "$mf" am_nothing } getClasspath() { [ -n "$DEBUG" ] && set -vx ajrt=`canonicalPath "${ASPECTJ_HOME:-c:/home/apps/aspectj-1.1.1}/lib/aspectjrt.jar"` echo "${ajrt};`cygpath -ma ../lib/ant/lib/ant.jar`" } getInjars() { [ -n "$DEBUG" ] && set -vx cp="" sep="" for i in "$1" ../lib/bcel/bcel.jar \ ../org.eclipse.jdt.core/jdtcore-for-aspectj.jar \ ; do cp="${cp}${sep}`canonicalPath "$i"`" [ -z "${sep}" ] && sep=";" done echo "$cp" } setupManifest() { [ -n "$DEBUG" ] && set -vx midir="../ajbrowser/src/META-INF" [ -d "$midir" ] || mkdir ../ajbrowser/src/META-INF sed 's|@build.version.short@|1.1.1|;s|@company.name@|na|' \ ../ajbrowser/ajbrowser.mf.txt > "$1" } generateFile() { resourceJar="$1" outputJar="$2" [ -n "$DEBUG" ] && set -vx [ -f "$resourceJar" ] || exit 98 [ -n "$outputJar" ] || exit 98 rm -f "$outputJar" PS=";" #sourceroots=`getSourceroots` classpath=`getClasspath` injars=`getInjars "$resourceJar"` cat< aspectjtools.lst ls -ald "$resourceJar" aspectjtools.lst fi