Saturday, May 24, 2014

cleaning up cdslck files in Cadence.

I created a script that finds all of the cdslck files and deletes them. Even if they are in SVN.
cleanlck.sh
#!/bin/bash
# This script files all cdslck files that Cadence creates and
# removes them.  This includes safe handling of cdslck files that
# have been committed to SVN.
FILES=$(find . -type f -name *cdslck*)
for f in $FILES
do
 #echo "Processing $f"
 svn info $f 1>/dev/null 2>&1
 if [ $? -eq 1 ];then
  rm -f $f
 else
  svn rm $f
 fi
done

Thursday, May 15, 2014

creating a java jar file under Mac OS

In theory, this is easy. In practice, it is easy if you remember that you need a newline at the BOTTOM of the manifest file. The Manifest.txt just needs a new line, and it all works. It took me a few hours to figure this out. :/
Main-Class: testclass

And you just create the .jar file from your .class files:
jar cfm spicespi.jar Manifest.txt *.class
And then you can run it (or just click it in Mac OS.)
java -jar testclass.jar