]> git.saurik.com Git - apple/security.git/blobdiff - SecurityTests/cspxutils/buildExample
Security-57031.1.35.tar.gz
[apple/security.git] / SecurityTests / cspxutils / buildExample
diff --git a/SecurityTests/cspxutils/buildExample b/SecurityTests/cspxutils/buildExample
new file mode 100755 (executable)
index 0000000..cf34815
--- /dev/null
@@ -0,0 +1,32 @@
+#! /bin/csh -f
+#
+# Build a standalone CDSA example package consisting of rsaTool,
+# dhTest, cryptTool, and the library upon which they depend. 
+#
+set packageName=CDSA_Examples
+set targetDirs=( rsatool dhTest cryptTool utilLib )
+set targetFiles=( Makefile Makefile.lib Makefile.cdsa )
+set readmeSrc=EXAMPLES_README
+set readmeDst=README
+
+if ( $#argv != 1 ) then
+       echo target_dir/$packageName must not exist
+       exit(1)
+endif
+
+# packageDir is root
+set packageDir=$argv[1]/$packageName
+if (-e $packageDir) then
+       echo target_dir/$packageName must not exist
+       exit(1)
+endif
+
+echo Creating destination directory...
+mkdir -p $packageDir || exit(1)
+echo Copying source files...
+cp -pr $targetDirs $targetFiles $packageDir || exit(1)
+echo Installing README...
+cp -p $readmeSrc $packageDir/$readmeDst
+echo Cleaning destination directories...
+cd $packageDir; make clean
+echo Done.