aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2013-07-08 23:08:05 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2013-07-08 23:08:05 -0400
commit1d249aa4a3016ebe4cbcfdf23bcf9f5293f37163 (patch)
tree5d1ae46800ffa592a9182fad7642710de042204b /scripts
parent6600c4f959bb4ea91a2f632bfc5375f7e75e40c4 (diff)
Renamed Textadept module's "mime_types" to "file_types" and removed config file.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gen_plist.lua19
1 files changed, 10 insertions, 9 deletions
diff --git a/scripts/gen_plist.lua b/scripts/gen_plist.lua
index fc47203c..54ae0d38 100755
--- a/scripts/gen_plist.lua
+++ b/scripts/gen_plist.lua
@@ -7,16 +7,17 @@ local lang, exts
local languages, extensions = {}, {}
-- Read languages and extensions.
-local f = io.open('../modules/textadept/mime_types.conf')
-for line in f:lines() do
- if line:find('^%%') then
- lang, exts = line:match('^%%%s*(.+)$'), {}
+local f = io.open('../modules/textadept/file_types.lua')
+local types = f:read('*all'):match('M.extensions = (%b{})'):sub(2)
+f:close()
+for type in types:gmatch('(.-)[%],}]+') do
+ if type:find('^%-%-') then
+ lang, exts = type:match('([^%[]+)$'), {}
if lang then languages[#languages + 1], extensions[lang] = lang, exts end
- elseif line:find('^%a') then
- exts[#exts + 1] = line:match('^%S+')
+ else
+ exts[#exts + 1] = type:match('^%[?\'?([^\'=]+)')
end
end
-f:close()
-- Generate and write the XML.
local xml = {[[
@@ -68,7 +69,7 @@ xml[#xml + 1] = [[
</dict>
</array>
<key>CFBundleExecutable</key>
- <string>textadept</string>
+ <string>textadept_osx</string>
<key>CFBundleIconFile</key>
<string>textadept.icns</string>
<key>CFBundleIdentifier</key>
@@ -82,7 +83,7 @@ xml[#xml + 1] = [[
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>7.0 alpha</string>
+ <string>7.0 alpha 2</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>