From a61d7df57b63b891544eb2cd9db80f9a46b62ae6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Andr=C3=A9e?= Date: Mon, 1 Apr 2013 21:43:49 +0200 Subject: [PATCH] update dist.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- dev/dist.sh | 50 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/dev/dist.sh b/dev/dist.sh index 7b49d61a..a9088f7a 100755 --- a/dev/dist.sh +++ b/dev/dist.sh @@ -4,36 +4,46 @@ # or dev/dist.sh pdfmanual # or dev/dist.sh tag VERSION [OTHER OPTIONS FOR `git tag`] # or dev/dist.sh beigepdf +# or dev/dist.sh remaster ttyponies() { defaultoutparams=--colourful y --left - --right - --top - --bottom - --balloon n --fullcolour y - mkdir -p "ttyponies" - for pony in $(ls --color=no "ponies/"); do - if [ ! "$pony" = '.info' ]; then - echo "building ttypony: $pony" - if [ "`readlink "ponies/$pony"`" = '' ]; then - ponytool --import ponysay --file "ponies/$pony" --export ponysay --platform linux --file "ttyponies/$pony" $defaultoutparams - git add "ttyponies/$pony" + for x in '' 'extra'; do + mkdir -p "${x}ttyponies" + for pony in $(find "${x}ponies/" | grep -v '/\.' | grep '\.pony$' | sed -e "s_^${x}ponies/__"); do + echo "building ${x}ttypony: $pony" + if [ ! -L "${x}ponies/$pony" ]; then + ponytool --import ponysay --file "${x}ponies/$pony" \ + --export ponysay --platform linux --file "${x}ttyponies/$pony" $defaultoutparams + git add "${x}ttyponies/$pony" else - ln -sf `readlink "ponies/$pony"` "ttyponies/$pony" - git add "ttyponies/$pony" + ln -sf "$(readlink "${x}ponies/$pony")" "${x}ttyponies/$pony" + git add "${x}ttyponies/$pony" fi - fi + done 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 - ponytool --import ponysay --file "extraponies/$pony" --export ponysay --platform linux --file "extrattyponies/$pony" $defaultoutparams - git add "extrattyponies/$pony" +} + + +remaster() +{ + defaultoutparams=--colourful y --left - --right - --top - --bottom - --balloon n --fullcolour y + for x in '' 'extra'; do + mkdir -p "${x}ttyponies" + for pony in $(find "${x}ponies/" | grep -v '/\.' | grep '\.pony$' | sed -e "s_^${x}ponies/__"); do + echo "remastering ${x}pony: $pony" + if [ ! -L "${x}ponies/$pony" ]; then + ponytool --import ponysay --file "${x}ponies/$pony" \ + --export ponysay --file "${x}ponies/$pony" $defaultoutparams \ + --export ponysay --platform linux --file "${x}ttyponies/$pony" $defaultoutparams + git add "${x}ponies/$pony" "${x}ttyponies/$pony" else - ln -sf `readlink "extraponies/$pony"` "extrattyponies/$pony" - git add "extrattyponies/$pony" + ln -sf "$(readlink "${x}ponies/$pony")" "${x}ttyponies/$pony" + git add "${x}ttyponies/$pony" fi - fi + done done }