#!/bin/bash ########################################################################### # Copyright (C) 2009 by Tobias Mueller, Tobias_Mueller@twam.info # # # # This program is free software; you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation; either version 2 of the License, or # # (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANYs WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program; if not, write to the # # Free Software Foundation, Inc., # # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ########################################################################### if [ "$1" = "" -o "$1" = "--help" ] then echo "Usage: $0 width height fontsize line1 line2"; echo "width height and font is interpreted in points" exit; fi sed --silent -e '/PSTEMPLATE$/,/^PSTEMPLATE$/p' "$0" \ | sed -e '/PSTEMPLATE$/d' \ | sed -e "s/WIDTH/$1/" \ | sed -e "s/HEIGHT/$2/" \ | sed -e "s/FONTSIZE/$3/" \ | sed -e "s#LINE1#$4#" \ | sed -e "s#LINE2#$5#" \ | sed -e "s/COPYRIGHT/\xA9/" exit; : <