You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
debian-installer/build/util/bootvars-subst

17 lines
309 B

#!/usr/bin/perl
# Usage: bootvars-subst subst0 value0 subst1 value1 ...
# < file > outfile
my %subst;
while (@ARGV) {
my $key=shift;
my $value=shift;
$subst{$key}=$value;
}
while (<>) {
s/\$\{BOOTPROMPT\}\n?$//g; # special case
s/\$\{([a-zA-Z0-9_]+)\}/$subst{$1}/g;
print;
}