From 1adaea0daf6e83f7eb86b067c615a524b4aef34c Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 19 Aug 2012 06:26:27 +0200 Subject: quotes in make --- configure | 29 ++++++++++++++--------------- ponyquotes.sh | 17 ----------------- 2 files changed, 14 insertions(+), 32 deletions(-) delete mode 100755 ponyquotes.sh diff --git a/configure b/configure index 2581660..2e65675 100755 --- a/configure +++ b/configure @@ -19,7 +19,7 @@ oldCompiledDirs='' installedFiles='bin/ponysay bin/ponythink bin/ponysay.py bin/ponythink.py doc/ponysay.pdf share/info/ponysay.info.gz share/info/ponythink.info.gz' installedDirs='share/ponysay lib/ponysay' compiledFiles='truncater ponysay.info.gz ponysay.py.install' -compiledDirs='' +compiledDirs='quotes' for man in $manFiles; do oldCompiledFiles="$oldCompiledFiles $man.gz" @@ -160,7 +160,7 @@ function makeMakefile() echo echo 'default: '"$compileMethods" echo - echo 'all: core truncater manpages infomanual ponysaycompletion ponythinkcompletion' + echo 'all: core truncater quotes manpages infomanual ponysaycompletion ponythinkcompletion' echo echo "core:" @@ -172,6 +172,17 @@ function makeMakefile() echo '$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o "truncater" "truncater.c"' echo + echo "quotes:" + echo -en '\t' ; echo 'mkdir -p quotes' + echo -en '\t' ; echo 'for ponies in $$(cat ponyquotes/ponies); do \' + echo -en '\t' ; echo ' for pony in $$(echo $$ponies | sed -e '\''s/+/ /g'\''); do \' + echo -en '\t' ; echo ' echo '\''Generating quote files for '\''"$$pony"; \' + echo -en '\t' ; echo ' for file in $$(ls "ponyquotes/" | grep "$$pony\\.*"); do \' + echo -en '\t' ; echo ' if [ -f "ponyquotes/$$file" ]; then \' + echo -en '\t' ; echo ' cp "ponyquotes/"$$file "quotes/"$$ponies'\''.'\''$$(echo $$file | cut -d '\''.'\'' -f 2) \' + echo -en '\t' ; echo ';fi;done;done;done' + echo + echo 'manpages:' gzCompress $manFiles echo @@ -190,7 +201,7 @@ function makeMakefile() thinkCompletion $completions echo - echo 'install-min: core truncater' + echo 'install-min: core truncater quotes' echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/share/ponysay/"' for dir in $shareDirs; do echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/share/ponysay/'"$dir"'"' @@ -342,18 +353,6 @@ pdfmanual: done if [ -d "ponysay.t2d" ]; then rm -r "ponysay.t2d"; fi -submodules: clean - (cd "ponyquotes4ponysay/"; make clean) - git submodule init - git submodule update - -quotes: submodules - (cd "ponyquotes4ponysay/"; make -B) - if [ -d quotes ]; then git rm "quotes/"*.*; fi - mkdir -p "quotes" - cp "ponyquotes4ponysay/ponyquotes/"*.* "quotes" - git add "quotes/"*.* - EOF } diff --git a/ponyquotes.sh b/ponyquotes.sh deleted file mode 100755 index 9c34226..0000000 --- a/ponyquotes.sh +++ /dev/null @@ -1,17 +0,0 @@ -mkdir -p quotes - -for ponies in $(cat ponyquotes/ponies); do - - for pony in $(echo $ponies | sed -e 's/+/ /g'); do - echo 'Generating quote files for '"$pony" - - for file in $(ls "ponyquotes/" | grep "$pony\\.*"); do - - if [[ -f "ponyquotes/$file" ]]; then - - cp "ponyquotes/"$file "quotes/"$ponies'.'$(echo $file | cut -d '.' -f 2) - fi - done - done -done - -- cgit