Browse Source

Add python scripts to createPluginJar.sh, and move list of vaild extentions to the top of the file for easy editing.

Change-Id: I4a6788769418387857537698aa49cb6b3424e131
Reviewed-on: http://gerrit.dmdirc.com/645
Automatic-Compile: Shane Mc Cormack <shane@dmdirc.com>
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.6.3b1
Shane Mc Cormack 14 years ago
parent
commit
8fbde2fb40
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      createPluginJar.sh

+ 7
- 1
createPluginJar.sh View File

1
 #!/bin/bash
1
 #!/bin/bash
2
 # This script will create a plugin jar file for a given plugin.
2
 # This script will create a plugin jar file for a given plugin.
3
 
3
 
4
+VALID_EXTS="class,png,exe,dll,html,css,js,gif,py"
5
+
4
 if [ "${1}" = "" -o "${2}" = "" ]; then
6
 if [ "${1}" = "" -o "${2}" = "" ]; then
5
 	echo "Usage Example: ${0} com.dmdirc.addons.windowstatus WindowStatusPlugin"
7
 	echo "Usage Example: ${0} com.dmdirc.addons.windowstatus WindowStatusPlugin"
6
 	echo "The above would create WindowStatusPlugin.jar in the plugins/ folder of the current dir"
8
 	echo "The above would create WindowStatusPlugin.jar in the plugins/ folder of the current dir"
83
 			/bin/sh "${prepackage}"
85
 			/bin/sh "${prepackage}"
84
 			cd ${DIR}
86
 			cd ${DIR}
85
 		done;
87
 		done;
86
-		jar -uvf "${srcdir}/src/${foldername}/${2}.jar" `ls -1 ${foo}${bit}/*.{class,png,exe,dll,html,css,js,gif} 2>/dev/null` >/dev/null
88
+
89
+		FILES="ls -1 "${foo}${bit}/"*.{${VALID_EXTS}}"
90
+                FILES=`eval ${FILES} 2>/dev/null`
91
+
92
+		jar -uvf "${srcdir}/src/${foldername}/${2}.jar" ${FILES} >/dev/null
87
 	fi
93
 	fi
88
 done
94
 done
89
 
95
 

Loading…
Cancel
Save