Subversion Repositories SvarDOS

Rev

Rev 951 | Rev 1011 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 951 Rev 999
Line 8... Line 8...
8
  files. buildidx will generate the index file and save it into the package
8
  files. buildidx will generate the index file and save it into the package
9
  repository.
9
  repository.
10
 
10
 
11
  requires php-zip
11
  requires php-zip
12
 
12
 
-
 
13
  28 feb 2022: svarcom allowed to have a COMMAND.COM file without subdirectory
13
  24 feb 2022: added hardcoded hack to translate version 'x.xx' to '0.44' (NESticle)
14
  24 feb 2022: added hardcoded hack to translate version 'x.xx' to '0.44' (NESticle)
14
  23 feb 2022: basic validation of source archives (not empty + matches an existing svp file)
15
  23 feb 2022: basic validation of source archives (not empty + matches an existing svp file)
15
  21 feb 2022: buildidx collects categories looking at the dir layout of each package + improved version string parsing (replaced version_compare call by dos_version_compare)
16
  21 feb 2022: buildidx collects categories looking at the dir layout of each package + improved version string parsing (replaced version_compare call by dos_version_compare)
16
  17 feb 2022: checking for non-8+3 filenames in packages and duplicates + devload no longer part of CORE
17
  17 feb 2022: checking for non-8+3 filenames in packages and duplicates + devload no longer part of CORE
17
  16 feb 2022: added warning about overlong version strings and wild files location
18
  16 feb 2022: added warning about overlong version strings and wild files location
Line 33... Line 34...
33
  10 jul 2013: changed unzip calls to 7za (to handle cases when appinfo is compressed with lzma)
34
  10 jul 2013: changed unzip calls to 7za (to handle cases when appinfo is compressed with lzma)
34
  04 feb 2013: added CRC32 support
35
  04 feb 2013: added CRC32 support
35
  22 sep 2012: forked 1st version from FDUPDATE builder
36
  22 sep 2012: forked 1st version from FDUPDATE builder
36
*/
37
*/
37
 
38
 
38
$PVER = "20220224";
39
$PVER = "20220228";
39
 
40
 
40
 
41
 
41
// computes the BSD sum of a file and returns it
42
// computes the BSD sum of a file and returns it
42
function file2bsum($fname) {
43
function file2bsum($fname) {
43
  $result = 0;
44
  $result = 0;
Line 284... Line 285...
284
 
285
 
285
 
286
 
286
// load the list of CORE and MSDOS_COMPAT packages
287
// load the list of CORE and MSDOS_COMPAT packages
287
 
288
 
288
$core_packages_list = load_core_list($repodir);
289
$core_packages_list = load_core_list($repodir);
289
$msdos_compat_list = explode(' ', 'append assign attrib chkdsk choice command comp cpidos debug defrag deltree diskcomp diskcopy display edit edlin exe2bin fc fdapm fdisk find format help himemx kernel keyb label localcfg mem mirror mode more move nlsfunc print replace share shsucdx sort swsubst tree undelete unformat xcopy');
290
$msdos_compat_list = explode(' ', 'append assign attrib chkdsk choice comp cpidos debug defrag deltree diskcomp diskcopy display edit edlin exe2bin fc fdapm fdisk find format help himemx kernel keyb label localcfg mem mirror mode more move nlsfunc print replace share shsucdx sort svarcom swsubst tree undelete unformat xcopy');
290
 
291
 
291
// do a list of all svp packages with their available versions and descriptions
292
// do a list of all svp packages with their available versions and descriptions
292
 
293
 
293
$pkgdb = array();
294
$pkgdb = array();
294
foreach ($pkgfiles as $fname) {
295
foreach ($pkgfiles as $fname) {
Line 390... Line 391...
390
      if (str_head_is($f, "doc/{$pkgdir}/")) continue;
391
      if (str_head_is($f, "doc/{$pkgdir}/")) continue;
391
      if ($f === 'doc/') continue;
392
      if ($f === 'doc/') continue;
392
      if (str_head_is($f, "nls/{$pkgdir}.")) continue;
393
      if (str_head_is($f, "nls/{$pkgdir}.")) continue;
393
      if ($f === 'nls/') continue;
394
      if ($f === 'nls/') continue;
394
    }
395
    }
-
 
396
    // SVARCOM is allowed to have a root-based COMMAND.COM file
-
 
397
    if ($pkgnam === 'svarcom') {
-
 
398
      if ($f === 'command.com') continue;
-
 
399
    }
395
    // the help package is allowed to put files in... help
400
    // the help package is allowed to put files in... help
396
    if (($pkgnam == 'help') && (str_head_is($f, 'help/'))) continue;
401
    if (($pkgnam == 'help') && (str_head_is($f, 'help/'))) continue;
397
    // must be category-prefixed file, add it to the list of categories for this package
402
    // must be category-prefixed file, add it to the list of categories for this package
398
    $catlist[] = explode('/', $f)[0];
403
    $catlist[] = explode('/', $f)[0];
399
    // well-known "category" dirs are okay
404
    // well-known "category" dirs are okay