aboutsummaryrefslogtreecommitdiff
path: root/sboconfig
diff options
context:
space:
mode:
Diffstat (limited to 'sboconfig')
-rwxr-xr-xsboconfig8
1 files changed, 5 insertions, 3 deletions
diff --git a/sboconfig b/sboconfig
index f07b589..892279c 100755
--- a/sboconfig
+++ b/sboconfig
@@ -6,7 +6,6 @@
# script to handle sbotools configuration
#
# author: Jacob Pipkin <j@dawnrazor.net>
-# date: Pungenday, the 40th day of Discord in the YOLD 3178
# license: WTFPL <http://sam.zoy.org/wtfpl/COPYING>
use 5.16.0;
@@ -83,7 +82,7 @@ while (my ($key, $value) = each %valid_confs) {
$changes{$value} = $options{$key} if exists $options{$key};
}
-my $die = "You have provided an invalid parameter for";
+my $die = 'You have provided an invalid parameter for';
if (exists $changes{NOCLEAN}) {
die "$die -c\n" unless $changes{NOCLEAN} =~ /^(TRUE|FALSE)$/;
@@ -103,6 +102,9 @@ if (exists $changes{SBO_HOME}) {
# safely modify our conf file; write its contents to a temp file, modify the
# temp file, write the contents of the temp file back to the conf file
+# TODO: if multiple options are provided to this script, this sub should write
+# them all at once, instead of only a single one and having to call it once for
+# each option specified to the script.
sub config_write ($$) {
exists $_[1] or script_error 'config_write requires two arguments.';
my ($key, $val) = @_;
@@ -125,7 +127,7 @@ sub config_write ($$) {
untie @temp;
# otherwise, append our new $key=$value pair
print {$tempfh} "$key=$val\n" unless $has;
- # then over write the conf file with the contents of the temp file
+ # then overwrite the conf file with the contents of the temp file
seek $tempfh, 0, 0;
my $contents = do {local $/; <$tempfh>};
close $conffh;