Sha256: 698f65713e137043f9d0c57c23165f678549a3f5622e09b0502abeb5c80ccd11
Contents?: true
Size: 1.48 KB
Versions: 1
Compression:
Stored size: 1.48 KB
Contents
#!/usr/bin/env ruby # coding: utf-8 # # Copyright (c) 2013 Björn Albers <bjoernalbers@googlemail.com> kbv_dir = ARGV.first platypus = '/usr/local/bin/platypus' unless kbv_dir warn "usage: #{File.basename($0)} <kbv_dir>" exit 1 end raise 'First argument must be a directory!' unless File.directory?(kbv_dir) raise 'Platypus command line tool missing!' unless File.exists?(platypus) author = 'Kassenärztliche Bundesvereinigung' readme_path = File.join(kbv_dir, 'Dokumentation', 'Lies_mich.txt') version = File.open(readme_path, &:readline)[/Version\s+([\d\.]+)\s*$/,1] icon = File.expand_path('../../assets/kbv.icns', __FILE__) app_name = 'KBV' cmd = [platypus] << # Build the App with Platypus. '-y' << # Override existing app. '-B' << # Run in the background. '-R' << # Quit after running the script. "-a '#{ app_name }'" << # App name (visible in prefs., info, etc.) "-u '#{ author }'" << # Author. '-o None' << # Display no text field, progress bar, etc. '-p /bin/sh' << # Use shell as default interpreter. "-V '#{ version }'" << # The app version. "-i '#{ icon }'" # Path to icon file. Dir.glob("#{ kbv_dir }/*").each do |bundled_file| cmd << "-f '#{ bundled_file }'" # Include each file from the src dir. end cmd << "'#{ File.join(kbv_dir, 'StartAssistenten.sh')}'" # Start script. cmd << "'#{ app_name }.app'" # The actual app. system cmd.join(' ')
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kbv2app-0.0.1 | bin/kbv2app |