3
# makedesc directory file
5
# Scan the directory for files, and use the files to generate a task
6
# description file. The format of the task description file is described in
7
# tata.c. The format of the input files is:
11
# Description: Provide a basic GUI system
12
# This task provides functionality for a basic desktop; whether Gnome
13
# based, KDE based or customised. With this task, your system will boot
14
# into a graphical login screen, at which point you can choose which of
15
# these desktops you wish to use on a per-user basis. You can further
16
# customise your desktop once installed.
22
# Hash-comments are allowed in the files, but must be on their own lines.
24
my $dir=shift or die "no directory specified\n";
25
my $file=shift or die "no file specified\n";
27
open (OUT, ">$file") or die ">$file: $!";
30
find(\&processfile, $dir);
33
return unless /^[-_.A-Za-z0-9]+$/ and -f $_;
34
open (IN, $_) or die "$_: $!";
42
$fields{$field}.="\n$_";
45
($field, my $value)=split(/:\s*/, $_, 2);
47
$fields{$field}=$value;
52
print OUT map { ucfirst($_).": ".$fields{$_}."\n" }
53
qw{task section description};