1#!@BASH@ 2 3# Wrapper around xsltproc to mimic scrollkeeper-extract. 4# 5# Note that scrollkeeper internally uses libxslt for 6# this, so this method is cheaper and achieves the same result 7 8print_usage() 9{ 10 echo -e "Usage: " 11 echo -e "`basename $0` <xml file> <stylesheet 1> <output file 1> <stylesheet 2> <output file 2> ..." 12} 13 14if [[ $# < 2 ]] 15then 16 print_usage 17 exit 0 18fi 19 20infile=$1 21shift 1 22 23while true; do 24 xsltproc --xinclude --xincludestyle $1 $infile > $2 25 #echo "xml: $infile style: $1 out: $2" 26 shift 2 27 if [[ $# < 2 ]]; 28 then 29 break 30 fi 31done