+
+#
+# Just need a minimal action() subroutine for now..
+#
+
+sub action
+{
+ my ($command) = @_;
+
+ printf "$command\n";
+
+ my $result = system("$command 2>&1");
+
+ if (($result or $?) and $command !~ m!patch!)
+ {
+ die "ERROR: Unable to execute command: $!\n";
+ }
+}
+
+sub query_boolean
+{
+ my ($query_text, $default) = @_;
+ my $nondefault, $foo, $bar;
+
+ #
+ # Set $nondefault to the boolean opposite of $default.
+ #
+
+ if ($default eq "n")
+ {
+ $nondefault = "y";
+ }
+ else
+ {
+ $nondefault = "n";
+ }
+
+ print "${query_text} ";
+ print "[$default] ";
+
+ $foo = getc(STDIN);
+ $bar = <STDIN>;
+
+ if ($foo ne $nondefault)
+ {
+ $foo = $default;
+ }
+
+ return $foo;
+}
+