diff options
Diffstat (limited to 'macosx/updateInfoPlist.rb')
| -rw-r--r-- | macosx/updateInfoPlist.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/macosx/updateInfoPlist.rb b/macosx/updateInfoPlist.rb new file mode 100644 index 00000000..e022801c --- /dev/null +++ b/macosx/updateInfoPlist.rb @@ -0,0 +1,22 @@ +require 'osx/cocoa' +include OSX +OSX.require_framework 'ScriptingBridge' + +info = NSMutableDictionary.alloc.initWithContentsOfFile_(ARGV[0]) + +if info != nil then + ## could read the plist file + currentVersion = %x[bash version.sh] + + if currentVersion == "unknown" then + puts "version is invalid!" + else + puts "version is valid:" + currentVersion + + currentVersion = currentVersion.chomp + + info.setValue_forKey_(currentVersion, "CFBundleVersion") + + info.writeToFile_atomically_(ARGV[0] + "vers.plist", 0) + end +end
\ No newline at end of file |
