2012-08-26 05:11:53 +00:00
|
|
|
#!/bin/sh
|
2012-08-18 20:28:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
function makeMakefile()
|
|
|
|
{
|
2012-08-26 05:09:39 +00:00
|
|
|
params=''
|
|
|
|
for arg in "$@"; do
|
|
|
|
params="$params '$(echo $arg | sed -e "s/'/'\\''/g")'"
|
2012-08-18 20:49:34 +00:00
|
|
|
done
|
2012-08-20 16:53:00 +00:00
|
|
|
|
2012-08-26 05:09:39 +00:00
|
|
|
echo 'PARAMS ='"$params"
|
2012-08-19 17:36:00 +00:00
|
|
|
echo
|
2012-08-26 05:09:39 +00:00
|
|
|
echo -e 'default: all\n'
|
|
|
|
echo -e 'all: build\n'
|
|
|
|
for func in $(echo 'build' 'prebuilt' 'install' 'uninstall' 'uninstall-old' 'clean' 'clean-old' 'view'); do
|
|
|
|
echo -e "$func"':\n\t./setup.py $(PARAMS) '"$func"'\n'
|
2012-08-18 21:47:39 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
cat <<EOF
|
|
|
|
## Scripts for maintainers
|
|
|
|
|
|
|
|
ttyponies:
|
|
|
|
mkdir -p "ttyponies"
|
2012-08-22 13:50:42 +00:00
|
|
|
for pony in \$\$(ls --color=no "ponies/"); do \\
|
2012-08-26 05:13:08 +00:00
|
|
|
if [ ! "\$\$pony" = '.info' ]; then \\
|
2012-08-22 13:50:42 +00:00
|
|
|
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 \\
|
2012-08-26 05:13:08 +00:00
|
|
|
if [ ! "\$\$pony" = '.info' ]; then \\
|
2012-08-22 13:50:42 +00:00
|
|
|
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 ;\\
|
2012-08-18 21:47:39 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
EOF
|
2012-08-18 20:28:17 +00:00
|
|
|
}
|
|
|
|
|
2012-08-26 05:09:39 +00:00
|
|
|
|
|
|
|
makeMakefile "$@" > Makefile
|
2012-08-18 21:47:39 +00:00
|
|
|
|