Add files via upload

This commit is contained in:
Paul M 2020-11-01 22:05:28 -06:00 committed by GitHub
parent 7d20baf07d
commit 6ec1d7eff4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 162 additions and 0 deletions

49
stepper.pl Normal file
View file

@ -0,0 +1,49 @@
#!/usr/bin/perl
# step maker for bootup.pl
use Storable;
%steps = ();
open(steps,"<steps");
@lines = <steps>;
close steps;
# First item must be total number of steps
# each step consists of actions, can be multiple
foreach(@lines){
if($_ =~ /(step)/i){
#print "New step number $sc\n";
$sc++;
$substep = 1;
next;
}else{
@lp = split(/ /,$_);
#print " Step num = $sc\n";
for (my $i=1; $i <= scalar(@lp); $i++) {
$cmd .= "@lp[$i] ";
}
#print "CMD = $cmd";
$steps{$sc}{$substep}{@lp[0]} = $cmd;
#print "LP = @lp\n";
undef(@lp);
undef($cmd);
$substep++;
}
}
for $family ( keys %steps ) {
#print "Step # $family: ";
for $role ( keys %{ $steps{$family} } ) {
for $exeord ( keys %{ $steps{$family}{$role}}){
# print "sub hashex $exeord $role=$steps{$family}{$role}{$exeord} ";
}
#print "sub hash $role=$steps{$family}{$role} ";
}
# print "\n";
}
store \%steps, 'stpcomp';