Parcourir la source

Only build plugins that don't exist or have been modified

Fixes issue 2125
tags/0.6.3m1rc1
Chris Smith il y a 15 ans
Parent
révision
0cd591878f
1 fichiers modifiés avec 8 ajouts et 1 suppressions
  1. 8
    1
      createPluginJar.sh

+ 8
- 1
createPluginJar.sh Voir le fichier

@@ -7,9 +7,17 @@ if [ "${1}" = "" -o "${2}" = "" ]; then
7 7
 	exit;
8 8
 fi
9 9
 
10
+srcdir=${PWD}
10 11
 pluginname=${1}
11 12
 foldername=${pluginname//.//}
12 13
 
14
+newer=`find src/${foldername} -type f -newer ${srcdir}/plugins/${2}.jar 2>&1 | wc -l`
15
+
16
+if [ $newer -eq 0 ]; then
17
+	echo "${2}.jar appears to be up-to-date";
18
+	exit 0;
19
+fi
20
+
13 21
 echo "Creating ${2}.jar for ${pluginname} (${foldername})"
14 22
 
15 23
 if [ ! -e src/${foldername}/plugin.info -a ! -e src/${foldername}/plugin.config ]; then
@@ -18,7 +26,6 @@ if [ ! -e src/${foldername}/plugin.info -a ! -e src/${foldername}/plugin.config
18 26
 fi
19 27
 
20 28
 #echo "looking for classes"
21
-srcdir=${PWD}
22 29
 TMPDIR=`mktemp -d`
23 30
 #echo "Using temp dir: ${TMPDIR}"
24 31
 cd $TMPDIR

Chargement…
Annuler
Enregistrer