Subversion Repositories SvarDOS

Rev

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

Rev 781 Rev 791
Line 30... Line 30...
30
  10 jul 2013: changed unzip calls to 7za (to handle cases when appinfo is compressed with lzma)
30
  10 jul 2013: changed unzip calls to 7za (to handle cases when appinfo is compressed with lzma)
31
  04 feb 2013: added CRC32 support
31
  04 feb 2013: added CRC32 support
32
  22 sep 2012: forked 1st version from FDUPDATE builder
32
  22 sep 2012: forked 1st version from FDUPDATE builder
33
*/
33
*/
34
 
34
 
35
$PVER = "20220216";
35
$PVER = "20220217";
36
 
36
 
37
 
37
 
38
// computes the BSD sum of a file and returns it
38
// computes the BSD sum of a file and returns it
39
function file2bsum($fname) {
39
function file2bsum($fname) {
40
  $result = 0;
40
  $result = 0;
Line 111... Line 111...
111
function str_head_is($haystack, $needle) {
111
function str_head_is($haystack, $needle) {
112
  return strpos($haystack, $needle) === 0;
112
  return strpos($haystack, $needle) === 0;
113
}
113
}
114
 
114
 
115
 
115
 
-
 
116
// returns an array that contains CORE packages (populated from the core subdirectory in pkgdir)
-
 
117
function load_core_list($repodir) {
-
 
118
  $res = array();
-
 
119
 
-
 
120
  foreach (scandir($repodir . '/core/') as $f) {
-
 
121
    if (!preg_match('/\.svp$/', $f)) continue;
-
 
122
    $res[] = explode('.', $f)[0];
-
 
123
  }
-
 
124
  return($res);
-
 
125
}
-
 
126
 
-
 
127
 
116
// ***************** MAIN ROUTINE *********************************************
128
// ***************** MAIN ROUTINE *********************************************
117
 
129
 
118
//echo "SvarDOS repository index generator ver {$PVER}\n";
130
//echo "SvarDOS repository index generator ver {$PVER}\n";
119
 
131
 
120
if (($_SERVER['argc'] != 2) || ($_SERVER['argv'][1][0] == '-')) {
132
if (($_SERVER['argc'] != 2) || ($_SERVER['argv'][1][0] == '-')) {
Line 128... Line 140...
128
$pkgcount = 0;
140
$pkgcount = 0;
129
 
141
 
130
 
142
 
131
// load the list of CORE packages
143
// load the list of CORE packages
132
 
144
 
133
$core_packages_list = explode(' ', 'amb attrib chkdsk choice command cpidos debug deltree diskcopy display dosfsck edit fc fdapm fdisk find format help himemx kernel keyb label localcfg mem mode more move pkg pkgnet shsucdx sort tree');
145
$core_packages_list = load_core_list($repodir);
134
 
146
 
135
 
147
 
136
// do a list of all svp packages with their available versions and descriptions
148
// do a list of all svp packages with their available versions and descriptions
137
 
149
 
138
$pkgdb = array();
150
$pkgdb = array();