JAL-3247 Script to automatically install Jalview from the .dmg to /Applications
[jalview.git] / utils / auto_file_associations_info_plist.sh
1 perl -n -e 's/\s+/ /g;if(m/^ ?(\w+) ?\( ?"([^"]*)" ?, ?"([^"]*)" ?, ?(true|false) ?, ?(true|false) ?\) ?$/){$m=lc($1); $n=$2; $e=$3; @es=split(m/\s*,\s*/,$e); print "<dict>\n<key>CFBundleTypeExtensions</key>\n<array>\n";for $e (@es){print"<string>$e</string>\n";}print"</array>\n<key>CFBundleTypeName</key>\n<string>$n File</string>\n<key>CFBundleTypeIconFile</key>\n<string>Jalview-File.icns</string>\n<key>CFBundleTypeRole</key>\n<string>Editor</string>\n<key>CFBundleTypeMIMETypes</key>\n<array>\n<string>application/x-jalview-$m</string>\n</array>\n<key>LSIsAppleDefaultForType</key>\n<true/>\n</dict>\n\n";}' src/jalview/io/FileFormat.java