Support name_map. Simplify FreeDOS INSTPLAT; use TOOLS dir.
Chris Pressey
10 years ago
23 | 23 | http://catseye.tc/distfiles/shelta-1.2-2014.0422.zip |
24 | 24 | https://github.com/catseye/Illgol-Grand-Mal/archive/rel_16_tons_and_what_do_you_get.zip |
25 | 25 | ]], |
26 | ||
27 | name_map = { | |
28 | ["yasm-1.2.0-dos.exe"] = 'yasm120.exe', | |
29 | ["lua-5.2.2.tar.gz"] = 'lua522.tgz', | |
30 | ["shelta-1.2-2014.0422.zip"] = 'shelta12.zip', | |
31 | ["rel_16_tons_and_what_do_you_get.zip"] = 'illgolgm.zip' | |
32 | }, | |
26 | 33 | |
27 | 34 | distrepos_hg = [[ |
28 | 35 | https://bitbucket.org/catseye/befunge-93 |
0 | SET PATH=C:\DJGPP\BIN;%PATH% | |
0 | SET PATH=C:\DJGPP\BIN;C:\TOOLS;%PATH% | |
1 | 1 | SET DJGPP=C:\DJGPP\DJGPP.ENV |
13 | 13 | UNZIP D:\fil41b.zip |
14 | 14 | COPY D:\COPYING.DJ . |
15 | 15 | COPY D:\README.1ST . |
16 | CD .. | |
16 | ||
17 | 17 | :AlreadyDJGPP |
18 | REM UNZIP D:\NASM-~15.ZIP | |
19 | IF EXIST C:\FDOS\BIN\YASM.EXE GOTO AlreadyYASM | |
20 | UPX -9 D:\YASM-~17.EXE -oC:\FDOS\BIN\YASM.EXE | |
21 | :AlreadyYASM | |
22 | CD C:\FDOS\BIN | |
23 | IF EXIST C:\FDOS\BIN\TED3.COM GOTO AlreadyTED3 | |
18 | CD C:\ | |
19 | IF EXIST C:\TOOLS\NUL GOTO AlreadyTools | |
20 | MKDIR TOOLS | |
21 | UPX -9 D:\YASM120.EXE -oC:\TOOLS\YASM.EXE | |
22 | CD C:\TOOLS | |
24 | 23 | UNZIP D:\TED3.ZIP |
25 | :AlreadyTED3 | |
26 | 24 | COPY D:\INITFLOP.BAT . |
27 | 25 | COPY D:\PUTFLOPY.BAT . |
26 | ||
27 | :AlreadyTools | |
28 | 28 | CD C:\ |
29 | 29 | COPY AUTOEXEC.BAT TMP.BAT |
30 | 30 | COPY TMP.BAT+D:\DJGPPENV.BAT AUTOEXEC.BAT |
32 | 32 | COPY FDCONFIG.SYS TMP.SYS |
33 | 33 | COPY TMP.SYS+D:\NANSI.CFG FDCONFIG.SYS |
34 | 34 | DEL TMP.SYS |
35 | ||
35 | 36 | MKDIR SKEL |
36 | 37 | XCOPY D:\SKEL C:\SKEL /S /Y /R |
307 | 307 | execute(funicular, 'rm -rf staging_area') |
308 | 308 | execute(funicular, 'mkdir -p staging_area') |
309 | 309 | for url in string.gmatch(funicular.distfiles or "", "[^%s]+") do |
310 | execute(funicular, 'cp -p distfiles/' .. basename(url) .. ' staging_area/') | |
310 | local source_name = basename(url) | |
311 | local dest_name = source_name | |
312 | if funicular.name_map and funicular.name_map[source_name] then | |
313 | dest_name = funicular.name_map[source_name] | |
314 | end | |
315 | execute(funicular, 'cp -p distfiles/' .. source_name .. ' staging_area/' .. dest_name) | |
311 | 316 | end |
312 | 317 | for url in string.gmatch(funicular.distrepos_hg or "", "[^%s]+") do |
313 | 318 | if funicular.toolshelf_inside then |
319 | 324 | end |
320 | 325 | end |
321 | 326 | for url in string.gmatch(funicular.distrepos_git or "", "[^%s]+") do |
322 | execute(funicular, 'cd distrepos && tar zcf ../staging_area/github.com,catseye,' .. | |
323 | basename(url) .. '-master.tar.gz ' .. basename(url)) | |
327 | if funicular.toolshelf_inside then | |
328 | execute(funicular, 'cd distrepos && tar zcf ../staging_area/github.com,catseye,' .. | |
329 | basename(url) .. '-master.tar.gz ' .. basename(url)) | |
330 | else | |
331 | execute(funicular, 'cd distrepos && tar zcf ../staging_area/' .. | |
332 | basename(url) .. '.tgz ' .. basename(url)) | |
333 | end | |
324 | 334 | end |
325 | 335 | |
326 | 336 | if exists('skel') then |
446 | 456 | |
447 | 457 | local result, error = loadfile("Funicularfile") |
448 | 458 | if result == nil then |
449 | print("No Funicularfile found in this directory.") | |
459 | print("No valid Funicularfile found in this directory.") | |
450 | 460 | os.exit(1) |
451 | 461 | end |
452 | 462 | local funicular = result() |