home *** CD-ROM | disk | FTP | other *** search
- /*
- * This simple little program generates a script suitable for
- * running by the CLI "execute" command, to create crclists
- * for any range of disks in the AmigaLibDisk set.
- *
- * Typical use is:
- *
- * GenScript >ram:j 100 150
- * Execute ram:j
- */
-
- #include <stdio.h>
-
- #define FMT1 "find >find.out AmigaLibDisk%d: -type f -print\n"
- #define FMT2 "brik >Disk%03.3d.crc -Gbf find.out\n"
- #define FMT3 "brik -C Disk%03.3d.crc\n"
-
- main (argc, argv)
- int argc;
- char *argv[];
- {
- int start, stop;
-
- if (argc != 3) {
- printf ("usage: genscript startnumber stopnumber\n");
- } else {
- start = atoi (argv[1]);
- stop = atoi (argv[2]);
- while (start <= stop) {
- printf (FMT1, start);
- printf (FMT2, start);
- printf (FMT3, start);
- start++;
- }
- }
- }
-