~ubuntu-branches/ubuntu/breezy/fortunes-es/breezy

« back to all changes in this revision

Viewing changes to adjust-width.sh

  • Committer: Bazaar Package Importer
  • Author(s): Javier Fernandez-Sanguino Pen~a
  • Date: 2005-04-24 01:52:04 UTC
  • mfrom: (1.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050424015204-ndov9cxtiho7l0jf
Tags: 1.24
Added feminist fortunes provided by Miriam Ruiz to the -off package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
# Wrap all fortune quotes at 76 characters
 
3
 
 
4
which par >/dev/null 2>&1 || 
 
5
{ echo "'Par' program not found, aborting..." >/dev/null; exit 1; } 
 
6
 
 
7
for fortune in *fortunes; do
 
8
        if [ -f $fortune ] ; then
 
9
                mv $fortune $fortune.old
 
10
                cat $fortune.old | protect-quote.pl |
 
11
                par w72 P+%  | unprotect-quote.pl >$fortune
 
12
        fi
 
13
done
 
14
 
 
15
exit 0