aboutsummaryrefslogtreecommitdiff
path: root/pastebin/website-pastebin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xpastebin/website-pastebin9
1 files changed, 8 insertions, 1 deletions
diff --git a/pastebin/website-pastebin b/pastebin/website-pastebin
index 0d38ac2..9aa4956 100755
--- a/pastebin/website-pastebin
+++ b/pastebin/website-pastebin
@@ -42,10 +42,12 @@ use Term::ANSIColor;
my $help = 0;
my $title = '';
+my $lang = '';
my $test = 0;
GetOptions(
'help|h|?' => \$help,
'title|t=s' => \$title,
+ 'lang|l=s' => \$lang,
'test|?' => \$test
) or pod2usage(-verbose => 1, -exitval => 2);
pod2usage(
@@ -57,6 +59,11 @@ pod2usage(
-exitval => 2,
-message => colored("Missing required --title argument.", "red")
) if !$title && !$test;
+pod2usage(
+ -verbose =>1,
+ -exitval => 2,
+ -message => colored("Missing required --lang argument.", "red")
+) if !$lang && !$test;
# Taken from:
# https://stackoverflow.com/a/4009519
@@ -87,7 +94,7 @@ our $in = "$dirname/skeleton.org";
our $out;
my $date = `date +"%Y-%m-%d"`;
chomp $date;
-my %ENV = (title => $title, date => $date);
+my %ENV = (title => $title, date => $date, lang => $lang);
# Derived from both:
# https://unix.stackexchange.com/a/294836