X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=signature_stuff%2Fpick_a_quote.pl;h=a2de7091fbd97283b582a21154ff6a34b48a18b7;hb=31fcf3406fe05e918cfbbcd7742d7bc1253dec29;hp=1f1ab09ff17248cf817bef3cf53dd81e3a14696c;hpb=10fff37659bbe10892765c6db10f948fbe7888a3;p=lib.git diff --git a/signature_stuff/pick_a_quote.pl b/signature_stuff/pick_a_quote.pl index 1f1ab09..a2de709 100755 --- a/signature_stuff/pick_a_quote.pl +++ b/signature_stuff/pick_a_quote.pl @@ -5,9 +5,15 @@ use strict; use IO::File; -my $sigfile = new IO::File "> /home/don/.signature"; -my $templatefile = new IO::File "/home/don/signature_stuff/sigtemplate.txt"; -my $quotesfile = new IO::File "/home/don/signature_stuff/quote.txt"; +use User; + +my ($temp_file,$quote_file) = @ARGV; +$temp_file ||= User->Home."/lib/signature_stuff/sigtemplate.txt"; +$quote_file ||= User->Home."/lib/signature_stuff/quote.txt"; + +my $sigfile = new IO::File User->Home."/.signature", 'w' or die "Unable to open ~/.signature for writing; $!"; +my $templatefile = new IO::File $temp_file, 'r' or die "Unable to open $temp_file $!"; +my $quotesfile = new IO::File $quote_file,'r' or die "Unable to open $quote_file $!"; my $template = '';