Changeset 23242 for main/trunk/release-kits
- Timestamp:
- 2010-10-28T10:14:17+13:00 (13 years ago)
- Location:
- main/trunk/release-kits/shared/core
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/release-kits/shared/core/ant-scripts/shared.xml
r23210 r23242 381 381 <mkdir dir="components"/> 382 382 383 <pstf dir="compiled" outfile="compiled/uninstall/${component}.uninstall"> 383 <!-- the PatternSet To File task takes one or more patternsets and outputs to a file all of the files it includes --> 384 <pstf dir="compiled" outfile="compiled/uninstall/${component}.uninstall" toplevelonly="true"> 384 385 <patternset refid="greenstone${version.major}.${component}.component"/> 385 386 </pstf> -
main/trunk/release-kits/shared/core/uninstaller/Uninstall.bat
r23210 r23242 51 51 del Uninstall.* 52 52 del *.uninstall 53 del ..\bin 54 del ..\tmp 55 del ..\ext 53 rmdir /S /Q ..\bin 54 rmdir /S /Q ..\tmp 55 rmdir /S /Q ..\ext 56 rmdir /S /Q ..\uninstall 56 57 57 58 cd .. -
main/trunk/release-kits/shared/core/uninstaller/Uninstaller.java
r23210 r23242 443 443 for ( int i=0; i < files.length; i++) { 444 444 if( files[i].getAbsolutePath().endsWith(".uninstall") ) { 445 String[] paths = get RelevantPathsFromUninstallFile(files[i]);445 String[] paths = getPathsFromUninstallFile(files[i]); 446 446 447 447 for(int j=0; j < paths.length; j++) { … … 481 481 return (String[]) paths.toArray(new String[0]); 482 482 } 483 484 public String[] getPathsFromUninstallFile ( File uninstallFile ) { 485 486 ArrayList paths = new ArrayList(); 487 try { 488 BufferedReader in = new BufferedReader(new FileReader(uninstallFile)); 489 490 String line; 491 while ( (line = in.readLine()) != null ) { 492 if (line.length() > 0 && !paths.contains(line)) { 493 paths.add(line); 494 } 495 } 496 497 in.close(); 498 } 499 catch( Exception ex ) { 500 ex.printStackTrace(); 501 return null; 502 } 503 return (String[]) paths.toArray(new String[0]); 504 } 483 505 484 506 public void recursiveDelete( File f, File[] exceptions ) throws CancelledException {
Note:
See TracChangeset
for help on using the changeset viewer.