diff options
author | Mattias Andrée <maandree@operamail.com> | 2012-08-26 18:04:35 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2012-08-26 18:04:35 +0200 |
commit | 87232a4c389489ae7ed4e25bc56cc96628a25fde (patch) | |
tree | aa31fe82273e8ad99614ff45e9a43eb74670d89f /dev | |
parent | bea10d0e5474c2a042c25f3e9bf01da9d9ef75fa (diff) | |
download | ponysay-87232a4c389489ae7ed4e25bc56cc96628a25fde.tar.gz ponysay-87232a4c389489ae7ed4e25bc56cc96628a25fde.tar.bz2 ponysay-87232a4c389489ae7ed4e25bc56cc96628a25fde.zip |
`dev/dist.sh ttyponies` is used instead of `make -B ttyponies` + same for `make pdfmanual`
Diffstat (limited to 'dev')
-rwxr-xr-x | dev/dist.sh | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/dev/dist.sh b/dev/dist.sh new file mode 100755 index 0000000..321b0f3 --- /dev/null +++ b/dev/dist.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + + +ttyponies() +{ + mkdir -p "ttyponies" + for pony in $(ls --color=no "ponies/"); do + if [ ! "$pony" = '.info' ]; then + echo "building ttypony: $pony" + if [ "`readlink "ponies/$pony"`" = '' ]; then + ponysay2ttyponysay < "ponies/$pony" | tty2colourfultty -c 1 > "ttyponies/$pony" + git add "ttyponies/$pony" + else + ln -sf `readlink "ponies/$pony"` "ttyponies/$pony" + git add "ttyponies/$pony" + fi + fi + done + mkdir -p "extrattyponies" + for pony in $(ls --color=no "extraponies/"); do + if [ ! "$pony" = '.info' ]; then + echo "building extrattypony: $pony" + if [ "`readlink "extraponies/$pony"`" = '' ]; then + ponysay2ttyponysay < "extraponies/$pony" | tty2colourfultty -c 1 > "extrattyponies/$pony" + git add "extrattyponies/$pony" + else + ln -sf `readlink "extraponies/$pony"` "extrattyponies/$pony" + git add "extrattyponies/$pony" + fi + fi + done +} + + +pdfmanual() +{ + texi2pdf "manuals/ponysay.texinfo" + git add "manuals/ponysay.texinfo" "ponysay.pdf" + for ext in `echo aux cp cps fn ky log pg toc tp vr`; do + if [ -f "ponysay.\$\$ext" ]; then + unlink "ponysay.$ext" + fi + done + if [ -d "ponysay.t2d" ]; then + rm -r "ponysay.t2d"; + fi +} + + +[ "$1" = './dist.sh' ] && cd .. +"$@" |