home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / hacking / phreak_utils_pc / sostool.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-04-01  |  799 b   |  27 lines

  1. uses sos;
  2. var res :word;
  3.     buf :array[1..3000] of byte;
  4.     f   :file;
  5. begin
  6.   if paramcount=0 then begin
  7.     writeln;
  8.     writeln('sostool - sos library manager, (c) onkeld 1994');
  9.     writeln;
  10.     writeln('syntax: sostool cmd archive index [filename]');
  11.     writeln;
  12.     writeln('cmd:');
  13.     writeln;
  14.     writeln('d - directory of library');
  15.     writeln('a - add file to library');
  16.     writeln('x - xtract file from lib');
  17.     writeln;
  18.     halt($ff);
  19.   end;
  20.   sos.masterfile:=paramstr(2);
  21.   val(paramstr(3),sos.masterindex,res);
  22.   if res<>0 then begin writeln('invalid masterindex.'); halt; end;
  23.   if paramstr(1)='d' then sosdir(paramstr(2));
  24.   if paramstr(1)='a' then wildadd(paramstr(2),paramstr(4));
  25.   if paramstr(1)='x' then extract(paramstr(2),paramstr(4));
  26. end.
  27.