projects
/
koha_fer
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'origin/new/bug_7986'
[koha_fer]
/
misc
/
cronjobs
/
printoverdues.sh
diff --git
a/misc/cronjobs/printoverdues.sh
b/misc/cronjobs/printoverdues.sh
index
3cf1c3d
..
51bb30f
100755
(executable)
--- a/
misc/cronjobs/printoverdues.sh
+++ b/
misc/cronjobs/printoverdues.sh
@@
-1,4
+1,4
@@
-#!/
usr/
bin/bash
+#!/bin/bash
print_usage(){
echo "$0 : generates PDF files from html files in directorys and prints them";
print_usage(){
echo "$0 : generates PDF files from html files in directorys and prints them";
@@
-27,20
+27,24
@@
then
fi
if [[ -n $2 && -f $2 ]]
then
fi
if [[ -n $2 && -f $2 ]]
then
-
set $optpisa
"--css $2";
+
optpisa=
"--css $2";
fi
if [[ -n $3 ]]
then
fi
if [[ -n $3 ]]
then
-
set $optprinter
"-h $3";
+
optprinter=
"-h $3";
fi
if [[ -n $4 ]]
then
fi
if [[ -n $4 ]]
then
-
set $optprinter
"$optprinter -d $4";
+
optprinter=
"$optprinter -d $4";
fi
for i in $1/*.html
do
fi
for i in $1/*.html
do
- xhtml2pdf $optpisa $i
+ xhtml2pdf $optpisa $i
;
done
done
-lp $optprinter $1/*.pdf
-tar cvfz $directory`date "+%Y%m%d"`.tar.gz $directory
-rm -rf $directory
+
+if [[ -n $optprinter ]]
+then
+ lp $optprinter $1/*.pdf;
+fi
+
+tar cvfz $directory`date "+%Y%m%d"`.tar.gz $directory;