From 203858f6b508f10743960efa88221e65deff9e91 Mon Sep 17 00:00:00 2001 From: kintel Date: Mon, 10 May 2010 17:42:27 +0000 Subject: Autorun sanity check before publising git-svn-id: http://svn.clifford.at/openscad/trunk@541 b57f626f-c46c-0410-a088-ec61d464b74c diff --git a/scripts/macosx-sanity-check.py b/scripts/macosx-sanity-check.py index a085bda..c9fcb5d 100755 --- a/scripts/macosx-sanity-check.py +++ b/scripts/macosx-sanity-check.py @@ -4,6 +4,8 @@ # This is be used to verify that all the dependant libraries of a Mac OS X executable # are present and that they are backwards compatible with at least 10.5. # Run with an executable as parameter +# Will return 0 if the executable an all libraries are OK +# Returns != 0 and prints some textural description on error # # Author: Marius Kintel # @@ -82,6 +84,7 @@ def validate_lib(lib): return True if __name__ == '__main__': + error = False if len(sys.argv) != 2: usage() executable = sys.argv[1] if DEBUG: print "Processing " + executable @@ -113,3 +116,6 @@ if __name__ == '__main__': # print " " + str(processed[dep]) if not validate_lib(dep): print "..required by " + str(processed[dep]) + error = True + if error: sys.exit(1) + else: sys.exit(0) diff --git a/scripts/publish-macosx.sh b/scripts/publish-macosx.sh index 51d890e..684a601 100755 --- a/scripts/publish-macosx.sh +++ b/scripts/publish-macosx.sh @@ -9,6 +9,10 @@ export MACOSX_DEPLOY_DIR=$PWD/../libraries/deploy if [[ $? != 0 ]]; then exit 1 fi +`dirname $0`/macosx-sanity-check.py OpenSCAD.app/Contents/MacOS/OpenSCAD +if [[ $? != 0 ]]; then + exit 1 +fi cp OpenSCAD-$VERSION.dmg ~/Documents/Dropbox/Public ln -sf OpenSCAD-$VERSION.dmg ~/Documents/Dropbox/Public/OpenSCAD-latest.dmg -- cgit v0.10.1