Author: rmeggins
Update of /cvs/dirsec/winsync/passwordsync
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20568
Modified Files:
build.bat unzip.vbs
Log Message:
remove internal paths ; use new improved unzip.vbs
Index: build.bat
===================================================================
RCS file: /cvs/dirsec/winsync/passwordsync/build.bat,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- build.bat 16 Feb 2009 22:37:32 -0000 1.11
+++ build.bat 10 Mar 2009 20:06:27 -0000 1.12
@@ -82,8 +82,8 @@
rem ======== Fetch Components ========
if [%INTERNAL_BUILD%] == [1] (
- set
COMPONENT_URL=http://tsunami.dsdev.sjc.redhat.com/share/builds/components
- set
COMPONENT_URL2=http://tsunami.dsdev.sjc.redhat.com/share/builds/verification
+ set COMPONENT_URL=%SBC%
+ set COMPONENT_URL2=%SBV%
) else (
set
COMPONENT_URL=http://directory.fedoraproject.org/built/components
)
@@ -97,12 +97,9 @@
echo %NSPR_LOCATION%/%FLAVOR% > version.txt
%DOWNLOAD% %NSPR_LOCATION%/%FLAVOR%/mdbinary.jar
"%LIBROOT%\nspr\mdbinary.jar"
%DOWNLOAD% %NSPR_LOCATION%/%FLAVOR%/mdheader.jar
"%LIBROOT%\nspr\mdheader.jar"
-
- ren mdbinary.jar mdbinary.zip
- ren mdheader.jar mdheader.zip
- %UNZIP% mdbinary.zip
+ %UNZIP% mdbinary.jar
cd include
- %UNZIP% ..\mdheader.zip
+ %UNZIP% ..\mdheader.jar
popd
)
@@ -115,11 +112,9 @@
echo %NSS_LOCATION%/%FLAVOR% > version.txt
%DOWNLOAD% %NSS_LOCATION%/%FLAVOR%/mdbinary.jar
"%LIBROOT%\nss\mdbinary.jar"
%DOWNLOAD% %NSS_LOCATION%/include/xpheader.jar
"%LIBROOT%\nss\xpheader.jar"
- ren mdbinary.jar mdbinary.zip
- ren xpheader.jar xpheader.zip
- %UNZIP% mdbinary.zip
+ %UNZIP% mdbinary.jar
cd include
- %UNZIP% ..\xpheader.zip
+ %UNZIP% ..\xpheader.jar
popd
)
Index: unzip.vbs
===================================================================
RCS file: /cvs/dirsec/winsync/passwordsync/unzip.vbs,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- unzip.vbs 16 Feb 2009 22:37:32 -0000 1.1
+++ unzip.vbs 10 Mar 2009 20:06:27 -0000 1.2
@@ -4,8 +4,7 @@
WScript.Echo "Usage: cscript unzip.vbs \path\to\file.zip
[destinationfolder]"
WScript.Echo "Example: cscript unzip.vbs ..\src\foo.zip ..\dest"
WScript.Echo "NOTE: The .zip file must have a .zip extension, so if"
- WScript.Echo "you are trying to unzip a .jar file, you must copy or rename
it"
- WScript.Echo "to have a .zip extension"
+ WScript.Echo "it does not, a temporary copy will be made with a .zip
extension"
WScript.Echo "If the destinationfolder does not exist, it will be created"
WScript.Echo "Use '.' for the current directory"
WScript.Echo "If the destinationfolder is not specified, '.' will be
used"
@@ -39,6 +38,17 @@
WScript.Echo "Created new folder", DEST
End If
+' see if file ends in .zip - if not (e.g. .jar) make temp copy
+' that ends in .zip
+Dim newSRC
+newSRC = ""
+If not Right(SRC, 4) = ".zip" Then
+ newSRC = SRC & ".zip"
+ objFSO.CopyFile SRC, newSRC, true
+ SRC = newSRC
+End If
+
+' get the shell application object used to do the unzip
Set objShell = CreateObject("Shell.Application")
Set objSrc = objShell.Namespace(SRC)
Set objDest = objShell.Namespace(DEST)
@@ -47,7 +57,12 @@
' Next
objDest.CopyHere(objSrc.Items)
-WScript.Echo "Done. Copied contents of " & SRC & " to "
& DEST
+' remove temp zip, if any
+If Len(newSrc) > 0 Then
+ objFSO.DeleteFile(newSRC)
+End If
+
+WScript.Stdout.Write "Done. Copied contents of " & SRC & " to
" & DEST
' Set WshShell = WScript.CreateObject("WScript.Shell")
' WScript.Echo "CD =", WshShell.CurrentDirectory