From 6c871fde6c90c26362ddf0ad44dce4d2185fedc2 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 18 Aug 2012 22:28:17 +0200 Subject: beginning of configure --- configure | 271 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 271 insertions(+) create mode 100755 configure (limited to 'configure') diff --git a/configure b/configure new file mode 100755 index 0000000..ce1969a --- /dev/null +++ b/configure @@ -0,0 +1,271 @@ +#!/usr/bin/env bash + +if [ -f Makefile ]; then + rm -f Makefile + if [ ! $? == 0 ]; then + echo "$0"': fatal: unable to remove your old Makefile' >&2 + exit 1 + fi +fi + + + +PREFIX="/usr" +CPPFLAGS="" +CFLAGS="" +LDFLAGS="" + +compileMethods="" +completions=( 'completion/bash-completion.sh' 'completion/fish-completion.fish' 'completion/zsh-completion.zsh' ) + + +for arg in "$@"; do + opt="${arg%%=*}" + val="${arg##*=}" + if [ "$opt" = '--prefix' ]; then + PREFIX="$val" + fi +done + + +function correctPrefix() +{ + for file in "$@"; do + echo -en '\t' + echo 'sed -e '\''s/'\''\'\'''\''\/usr\//'\''\'\''"$(SED_PREFIX)"'\''\//g'\'' < "'"$file"'" > "'"$file"'.install"' + done +} + +function gzCompress() +{ + for file in "$@"; do + echo -en '\t' + echo 'gzip -9 -f < "'"$file"'" > "'"$file"'".gz' + done +} + +function thinkCompletion() +{ + for file in "$@"; do + echo -en '\tsed ' + echo -n '-e '\''s/ponysay/ponythink/g'\' + echo -n ' < "'"$file"'.install" | sed ' + echo -n '-e '\''s/\/ponythink\//\/ponysay\//g'\' + echo -n '-e '\''s/\\\/ponythink\\\//\\\/ponysay\\\//g'\' + thinkfile="${file%%.*}-think.${file##.*}" + echo ' > "'"$thinkfile"'"' + done +} + +echo "PREFIX = $PREFIX" +echo "CPPFLAGS = $CPPFLAGS" +echo "CFLAGS = $CFLAGS" +echo "LDFLAGS = $LDFLAGS" + + +function makeMakefile() +{ + echo 'PREFIX='\'"$PREFIX"\' + echo 'CPPFLAGS='\'"$CPPFLAGS"\' + echo 'CFLAGS='\'"$CFLAGS"\' + echo 'LDFLAGS='\'"$LDFLAGS"\' + echo 'INSTALLDIR="$(DESTDIR)$(PREFIX)"' + echo 'SED_PREFIX=$$(sed -e '\''s/\//\\\//g'\'' <<<$(PREFIX))' + echo + echo 'default: all' + echo + echo 'all:'"$compileMethods" + echo + + echo "core:" + correctPrefix 'ponysay.py' + echo + + echo "truncater:" + echo -en '\t' + echo '$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o "truncater" "truncater.c"' + echo + + echo 'manpages:' + gzCompress 'manuals/manpage.6' 'manuals/manpage.es.6' + echo + + echo 'infomanual:' + echo -en '\t' + echo 'makeinfo "manuals/ponysay.texinfo"' + gzCompress 'ponysay.info' + echo + + echo 'ponysaycompletion:' + correctPrefix "$completions" + echo + + echo 'ponythinkcompletion: ponysaycompletion' + thinkCompletion "$completions" + echo + +} +makeMakefile > Makefile + + + +#install-min: core truncater +# mkdir -p "$(INSTALLDIR)/share/ponysay/" +# mkdir -p "$(INSTALLDIR)/share/ponysay/ponies" +# mkdir -p "$(INSTALLDIR)/share/ponysay/ttyponies" +# mkdir -p "$(INSTALLDIR)/share/ponysay/quotes" +# cp -P ponies/*.pony "$(INSTALLDIR)/share/ponysay/ponies/" +# cp -P ttyponies/*.pony "$(INSTALLDIR)/share/ponysay/ttyponies/" +# cp -P quotes/*.* "$(INSTALLDIR)/share/ponysay/quotes/" +# +# mkdir -p "$(INSTALLDIR)/bin/" +# install "ponysay" "$(INSTALLDIR)/bin/ponysay" +# install "ponysay.py" "$(INSTALLDIR)/bin/ponysay.py" +# ln -sf "ponysay" "$(INSTALLDIR)/bin/ponythink" +# ln -sf "ponysay.py" "$(INSTALLDIR)/bin/ponythink.py" +# +# mkdir -p "$(INSTALLDIR)/lib/ponysay/" +# install -s "truncater" "$(INSTALLDIR)/lib/ponysay/truncater" +# +# mkdir -p "$(INSTALLDIR)/share/licenses/ponysay/" +# install "COPYING" "$(INSTALLDIR)/share/licenses/ponysay/COPYING" +# +#install-bash: ponythinkcompletion +# mkdir -p "$(INSTALLDIR)/share/bash-completion/completions/" +# install "completion/bash-completion.sh.install" "$(INSTALLDIR)/share/bash-completion/completions/ponysay" +# install "completion/bash-completion-think.sh" "$(INSTALLDIR)/share/bash-completion/completions/ponythink" +# +#install-zsh: ponythinkcompletion +# mkdir -p "$(INSTALLDIR)/share/zsh/site-functions/" +# install "completion/zsh-completion.zsh.install" "$(INSTALLDIR)/share/zsh/site-functions/_ponysay" +# install "completion/zsh-completion-think.zsh" "$(INSTALLDIR)/share/zsh/site-functions/_ponythink" +# +#install-fish: ponythinkcompletion +# mkdir -p "$(INSTALLDIR)/share/fish/completions/" +# install "completion/fish-completion.fish.install" "$(INSTALLDIR)/share/fish/completions/ponysay.fish" +# install "completion/fish-completion-think.fish" "$(INSTALLDIR)/share/fish/completions/ponythink.fish" +# +#install-man: manpages +# mkdir -p "$(INSTALLDIR)/share/man/man6" +# install "manuals/manpage.6.gz" "$(INSTALLDIR)/share/man/man6/ponysay.6.gz" +# ln -sf "ponysay.6.gz" "$(INSTALLDIR)/share/man/man6/ponythink.6.gz" +# +#install-man-es: manpages +# mkdir -p "$(INSTALLDIR)/share/man/es/man6" +# install "manuals/manpage.es.6.gz" "$(INSTALLDIR)/share/man/es/man6/ponysay.6.gz" +# ln -sf "ponysay.6.gz" "$(INSTALLDIR)/share/man/es/man6/ponythink.6.gz" +# +#install-info: infomanual +# mkdir -p "$(INSTALLDIR)/share/info" +# install "ponysay.info.gz" "$(INSTALLDIR)/share/info/ponysay.info.gz" +# install "ponysay.info.gz" "$(INSTALLDIR)/share/info/ponythink.info.gz" +# install-info --dir-file="$(INSTALLDIR)/share/info/dir" --entry="Miscellaneous" --description="My Little Ponies for your terminal" "$(INSTALLDIR)/share/info/ponysay.info.gz" +# install-info --dir-file="$(INSTALLDIR)/share/info/dir" --entry="Miscellaneous" --description="My Little Ponies for your terminal" "$(INSTALLDIR)/share/info/ponythink.info.gz" +# +#install-no-info: install-min install-bash install-zsh install-fish install-man install-man-es +# +#install-pdf: +# install "ponysay.pdf" "$(INSTALLDIR)/doc/ponysay.pdf" +# +#install: install-no-info install-info +# @echo -e '\n\n'\ +#'/--------------------------------------------------\\\n'\ +#'| ___ |\n'\ +#'| / (_) o |\n'\ +#'| \__ _ _ __ |\n'\ +#'| / / |/ | | / \_| | |\n'\ +#'| \___/ | |_/|/\__/ \_/|/ |\n'\ +#'| /| /| |\n'\ +#'| \| \| |\n'\ +#'| ____ |\n'\ +#'| | _ \ ___ _ __ _ _ ___ __ _ _ _ |\n'\ +#'| | |_) |/ _ \ | '\''_ \ | | | |/ __| / _` || | | | |\n'\ +#'| | __/| (_) || | | || |_| |\__ \| (_| || |_| | |\n'\ +#'| |_| \___/ |_| |_| \__, ||___/ \__,_| \__, | |\n'\ +#'| |___/ |___/ |\n'\ +#'\\--------------------------------------------------/' +# @echo 'dummy' | ./ponysay -f ./`if [[ "$$TERM" = "linux" ]]; then echo ttyponies; else echo ponies; fi`/pinkiecannon.pony | tail --lines=30 ; echo -e '\n' +# +#uninstall: +# if [ -d "$(INSTALLDIR)/share/ponysay" ]; then rm -fr "$(INSTALLDIR)/share/ponysay" ; fi +# if [ -d "$(INSTALLDIR)/lib/ponysay" ]; then rm -fr "$(INSTALLDIR)/lib/ponysay" ; fi +# if [ -f "$(INSTALLDIR)/bin/ponysay" ]; then unlink "$(INSTALLDIR)/bin/ponysay" ; fi +# if [ -f "$(INSTALLDIR)/bin/ponythink" ]; then unlink "$(INSTALLDIR)/bin/ponythink" ; fi +# if [ -f "$(INSTALLDIR)/share/licenses/ponysay/COPYING" ]; then unlink "$(INSTALLDIR)/share/licenses/ponysay/COPYING" ; fi +# if [ -f "$(INSTALLDIR)/share/bash-completion/completions/ponysay" ]; then unlink "$(INSTALLDIR)/share/bash-completion/completions/ponysay" ; fi +# if [ -f "$(INSTALLDIR)/share/bash-completion/completions/ponythink" ]; then unlink "$(INSTALLDIR)/share/bash-completion/completions/ponythink"; fi +# if [ -f "$(INSTALLDIR)/share/fish/completions/ponysay.fish" ]; then unlink "$(INSTALLDIR)/share/fish/completions/ponysay.fish" ; fi +# if [ -f "$(INSTALLDIR)/share/fish/completions/ponythink.fish" ]; then unlink "$(INSTALLDIR)/share/fish/completions/ponythink.fish" ; fi +# if [ -f "$(INSTALLDIR)/share/zsh/site-functions/_ponysay"; ]; then unlink "$(INSTALLDIR)/share/zsh/site-functions/_ponysay" ; fi +# if [ -f "$(INSTALLDIR)/share/zsh/site-functions/_ponythink"; ]; then unlink "$(INSTALLDIR)/share/zsh/site-functions/_ponythink" ; fi +# if [ -f "$(INSTALLDIR)/share/man/man6/ponysay.6.gz" ]; then unlink "$(INSTALLDIR)/share/man/man6/ponysay.6.gz" ; fi +# if [ -f "$(INSTALLDIR)/share/man/man6/ponythink.6.gz" ]; then unlink "$(INSTALLDIR)/share/man/man6/ponythink.6.gz" ; fi +# if [ -f "$(INSTALLDIR)/share/man/es/man6/ponysay.6.gz" ]; then unlink "$(INSTALLDIR)/share/man/es/man6/ponysay.6.gz" ; fi +# if [ -f "$(INSTALLDIR)/share/man/es/man6/ponythink.6.gz" ]; then unlink "$(INSTALLDIR)/share/man/es/man6/ponythink.6.gz" ; fi +# if [ -f "$(INSTALLDIR)/share/info/ponysay.info.gz" ]; then unlink "$(INSTALLDIR)/share/info/ponysay.info.gz" ; fi +# if [ -f "$(INSTALLDIR)/share/info/ponythink.info.gz" ]; then unlink "$(INSTALLDIR)/share/info/ponythink.info.gz" ; fi +# if [ -f "$(INSTALLDIR)/doc/ponysay.pdf" ]; then unlink "$(INSTALLDIR)/doc/ponysay.pdf" ; fi +# +#uninstall-old: +# if [ -d "$(INSTALLDIR)/share/ponies" ]; then rm -fr "$(INSTALLDIR)/share/ponies" ; fi +# if [ -d "$(INSTALLDIR)/share/ttyponies" ]; then rm -fr "$(INSTALLDIR)/share/ttyponies" ; fi +# if [ -f "$(INSTALLDIR)/bin/ponysaytruncater" ]; then unlink "$(INSTALLDIR)/bin/ponysaytruncater" ; fi +# if [ -d "$(INSTALLDIR)/lib/ponysay/link.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/link.pl" ; fi +# if [ -d "$(INSTALLDIR)/lib/ponysay/linklist.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/linklist.pl" ; fi +# if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps" ; fi +# if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps.pl" ; fi +# if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps-list" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps-list" ; fi +# if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps-list.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps-list.pl" ; fi +# +#clean: +# if [ -f "truncater" ]; then rm -f "truncater" ; fi +# if [ -f "completion/bash-completion-think.sh" ]; then rm -f "completion/bash-completion-think.sh" ; fi +# if [ -f "completion/fish-completion-think.fish" ]; then rm -f "completion/fish-completion-think.fish" ; fi +# if [ -f "completion/zsh-completion-think.zsh" ]; then rm -f "completion/zsh-completion-think.zsh" ; fi +# if [ -f "completion/bash-completion.sh.install" ]; then rm -f "completion/bash-completion.sh.install" ; fi +# if [ -f "completion/fish-completion.fish.install" ]; then rm -f "completion/fish-completion.fish.install"; fi +# if [ -f "completion/zsh-completion.zsh.install" ]; then rm -f "completion/zsh-completion.zsh.install" ; fi +# if [ -f "manuals/manpage.6.gz" ]; then rm -f "manuals/manpage.6.gz" ; fi +# if [ -f "manuals/manpage.es.6.gz" ]; then rm -f "manuals/manpage.es.6.gz" ; fi +# if [ -f "ponysay.info.gz" ]; then rm -f "ponysay.info.gz" ; fi +# if [ -f "ponysay.py.install" ]; then rm -f "ponysay.py.install" ; fi +# +#clean-old: +# if [ -f "ponysaytruncater" ]; then rm -f "ponysaytruncater"; fi +# +# +### Scripts for maintainers +# +#ttyponies: +# mkdir -p "ttyponies" +# for pony in $$(ls --color=no "ponies/"); do \ +# echo "building ttypony: $$pony" ;\ +# if [ `readlink "ponies/$$pony"` = "" ]; then \ +# ponysay2ttyponysay < "ponies/$$pony" | tty2colourfultty -c 1 -e > "ttyponies/$$pony" ;\ +# git add "ttyponies/$$pony" ;\ +# elif [ ! -f "ttyponies/$$pony" ]; then \ +# ln -s `readlink "ponies/$$pony"` "ttyponies/$$pony" ;\ +# git add "ttyponies/$$pony" ;\ +# 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 +# +#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/"*.* +# -- cgit From b3ed4b21a90adbf8b1079c55910c098b31d3e2ed Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 18 Aug 2012 22:49:34 +0200 Subject: continued work on configure --- configure | 65 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 33 insertions(+), 32 deletions(-) (limited to 'configure') diff --git a/configure b/configure index ce1969a..197e17b 100755 --- a/configure +++ b/configure @@ -1,14 +1,5 @@ #!/usr/bin/env bash -if [ -f Makefile ]; then - rm -f Makefile - if [ ! $? == 0 ]; then - echo "$0"': fatal: unable to remove your old Makefile' >&2 - exit 1 - fi -fi - - PREFIX="/usr" CPPFLAGS="" @@ -18,6 +9,11 @@ LDFLAGS="" compileMethods="" completions=( 'completion/bash-completion.sh' 'completion/fish-completion.fish' 'completion/zsh-completion.zsh' ) +shareDirs=( 'ponies' 'ttyponies' 'quote' ) +manFiles=( 'manuals/manpage.6' 'manuals/manpage.es.6' ) +licenseFiles=( 'COPYING' ) + + for arg in "$@"; do opt="${arg%%=*}" @@ -28,6 +24,7 @@ for arg in "$@"; do done + function correctPrefix() { for file in "$@"; do @@ -57,12 +54,15 @@ function thinkCompletion() done } + + echo "PREFIX = $PREFIX" echo "CPPFLAGS = $CPPFLAGS" echo "CFLAGS = $CFLAGS" echo "LDFLAGS = $LDFLAGS" + function makeMakefile() { echo 'PREFIX='\'"$PREFIX"\' @@ -87,7 +87,7 @@ function makeMakefile() echo echo 'manpages:' - gzCompress 'manuals/manpage.6' 'manuals/manpage.es.6' + gzCompress "$manFiles" echo echo 'infomanual:' @@ -104,32 +104,33 @@ function makeMakefile() thinkCompletion "$completions" echo + echo 'install-min: core truncater' + echo -en '\t' ; echo 'mkdir -p "'"$shareDir"'"' + for dir in "$shareDirs"; do + echo -en '\t' ; echo 'mkdir "$(INSTALLDIR)/share/ponysay/ponies'"$dir"'"' + echo -en '\t' ; echo 'cp -P "'"$dir"'/"*.* "$(INSTALLDIR)/share/ponysay/ponies'"$dir"'/"' + done + echo + echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/bin/"' + echo -en '\t' ; echo 'install "ponysay" "$(INSTALLDIR)/bin/ponysay"' + echo -en '\t' ; echo 'install "ponysay.py" "$(INSTALLDIR)/bin/ponysay.py"' + echo -en '\t' ; echo 'ln -sf "ponysay" "$(INSTALLDIR)/bin/ponythink"' + echo -en '\t' ; echo 'ln -sf "ponysay.py" "$(INSTALLDIR)/bin/ponythink.py"' + echo + echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/lib/ponysay/"' + echo -en '\t' ; echo 'install -s "truncater" "$(INSTALLDIR)/lib/ponysay/truncater"' + echo + echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/share/licenses/ponysay/"' + for file in "$licenseFiles"; do + echo -en '\t' + echo 'install "'"$file"'" "$(INSTALLDIR)/share/licenses/ponysay/'"$file"'"' + done + echo + } makeMakefile > Makefile - -#install-min: core truncater -# mkdir -p "$(INSTALLDIR)/share/ponysay/" -# mkdir -p "$(INSTALLDIR)/share/ponysay/ponies" -# mkdir -p "$(INSTALLDIR)/share/ponysay/ttyponies" -# mkdir -p "$(INSTALLDIR)/share/ponysay/quotes" -# cp -P ponies/*.pony "$(INSTALLDIR)/share/ponysay/ponies/" -# cp -P ttyponies/*.pony "$(INSTALLDIR)/share/ponysay/ttyponies/" -# cp -P quotes/*.* "$(INSTALLDIR)/share/ponysay/quotes/" -# -# mkdir -p "$(INSTALLDIR)/bin/" -# install "ponysay" "$(INSTALLDIR)/bin/ponysay" -# install "ponysay.py" "$(INSTALLDIR)/bin/ponysay.py" -# ln -sf "ponysay" "$(INSTALLDIR)/bin/ponythink" -# ln -sf "ponysay.py" "$(INSTALLDIR)/bin/ponythink.py" -# -# mkdir -p "$(INSTALLDIR)/lib/ponysay/" -# install -s "truncater" "$(INSTALLDIR)/lib/ponysay/truncater" -# -# mkdir -p "$(INSTALLDIR)/share/licenses/ponysay/" -# install "COPYING" "$(INSTALLDIR)/share/licenses/ponysay/COPYING" -# #install-bash: ponythinkcompletion # mkdir -p "$(INSTALLDIR)/share/bash-completion/completions/" # install "completion/bash-completion.sh.install" "$(INSTALLDIR)/share/bash-completion/completions/ponysay" -- cgit From 89ffad3c6462ad952b26c64a5677955e48b15e99 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 18 Aug 2012 23:47:39 +0200 Subject: work on configure --- configure | 221 ++++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 122 insertions(+), 99 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 197e17b..2868fb5 100755 --- a/configure +++ b/configure @@ -2,16 +2,35 @@ PREFIX="/usr" +INFODESC=\''My Little Ponies for your terminal'\' CPPFLAGS="" CFLAGS="" LDFLAGS="" -compileMethods="" -completions=( 'completion/bash-completion.sh' 'completion/fish-completion.fish' 'completion/zsh-completion.zsh' ) +compileMethods='all' -shareDirs=( 'ponies' 'ttyponies' 'quote' ) -manFiles=( 'manuals/manpage.6' 'manuals/manpage.es.6' ) -licenseFiles=( 'COPYING' ) +completions='completion/bash-completion.sh completion/fish-completion.fish completion/zsh-completion.zsh' +shareDirs='ponies ttyponies quote' +manFiles='manuals/manpage.6 manuals/manpage.es.6' +licenseFiles='COPYING' + + + +function getcompdir() +{ + if [ "$1" == 'bash' ]; then echo -n 'bash-completion/completions' + elif [ "$1" == 'fish' ]; then echo -n 'fish/completions' + elif [ "$1" == 'zsh' ]; then echo -n 'zsh/site-functions' + fi +} + +function getcompfile() +{ + if [ "$1" == 'bash' ]; then echo -n "$2" + elif [ "$1" == 'fish' ]; then echo -n "$2"'.fish' + elif [ "$1" == 'zsh' ]; then echo -n '_'"$2" + fi +} @@ -20,6 +39,8 @@ for arg in "$@"; do val="${arg##*=}" if [ "$opt" = '--prefix' ]; then PREFIX="$val" + elif [ "$opt" = '--info-desc' ]; then + INFODESC=\'"$(sed -e s/\'/\''\\'\'\'/g <<<"$val")"\' fi done @@ -49,7 +70,7 @@ function thinkCompletion() echo -n ' < "'"$file"'.install" | sed ' echo -n '-e '\''s/\/ponythink\//\/ponysay\//g'\' echo -n '-e '\''s/\\\/ponythink\\\//\\\/ponysay\\\//g'\' - thinkfile="${file%%.*}-think.${file##.*}" + thinkfile="${file%%.*}-think.${file##*.}" echo ' > "'"$thinkfile"'"' done } @@ -57,6 +78,7 @@ function thinkCompletion() echo "PREFIX = $PREFIX" +echo "INFODESC = $INFODESC" echo "CPPFLAGS = $CPPFLAGS" echo "CFLAGS = $CFLAGS" echo "LDFLAGS = $LDFLAGS" @@ -72,9 +94,9 @@ function makeMakefile() echo 'INSTALLDIR="$(DESTDIR)$(PREFIX)"' echo 'SED_PREFIX=$$(sed -e '\''s/\//\\\//g'\'' <<<$(PREFIX))' echo - echo 'default: all' + echo 'default: '"$compileMethods" echo - echo 'all:'"$compileMethods" + echo 'all: core truncater manpages infomanual ponysaycompletion ponythinkcompletion' echo echo "core:" @@ -87,7 +109,7 @@ function makeMakefile() echo echo 'manpages:' - gzCompress "$manFiles" + gzCompress $manFiles echo echo 'infomanual:' @@ -97,16 +119,16 @@ function makeMakefile() echo echo 'ponysaycompletion:' - correctPrefix "$completions" + correctPrefix $completions echo echo 'ponythinkcompletion: ponysaycompletion' - thinkCompletion "$completions" + thinkCompletion $completions echo echo 'install-min: core truncater' echo -en '\t' ; echo 'mkdir -p "'"$shareDir"'"' - for dir in "$shareDirs"; do + for dir in $shareDirs; do echo -en '\t' ; echo 'mkdir "$(INSTALLDIR)/share/ponysay/ponies'"$dir"'"' echo -en '\t' ; echo 'cp -P "'"$dir"'/"*.* "$(INSTALLDIR)/share/ponysay/ponies'"$dir"'/"' done @@ -117,57 +139,94 @@ function makeMakefile() echo -en '\t' ; echo 'ln -sf "ponysay" "$(INSTALLDIR)/bin/ponythink"' echo -en '\t' ; echo 'ln -sf "ponysay.py" "$(INSTALLDIR)/bin/ponythink.py"' echo - echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/lib/ponysay/"' - echo -en '\t' ; echo 'install -s "truncater" "$(INSTALLDIR)/lib/ponysay/truncater"' + echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/lib/ponysay/"' + echo -en '\t' ; echo 'install -s "truncater" "$(INSTALLDIR)/lib/ponysay/truncater"' echo echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/share/licenses/ponysay/"' - for file in "$licenseFiles"; do + for file in $licenseFiles; do echo -en '\t' echo 'install "'"$file"'" "$(INSTALLDIR)/share/licenses/ponysay/'"$file"'"' done echo + for completion in $completions; do + shell="${completion##*/}" + shell="${shell%%-*}" + thinkfile="${completion%%.*}-think.${completion##*.}" + shelldir='$(INSTALLDIR)/share/'"$(getcompdir $shell)"'/' + echo 'install-'"$shell"': ponysaycompletion ponythinkcompletion' + echo -en '\t' ; echo 'mkdir -p "'"$shelldir"'"' + echo -en '\t' ; echo 'install "'"$completion"'" "'"$shelldir$(getcompfile $shell ponysay)"'"' + echo -en '\t' ; echo 'install "'"$thinkfile"'" "'"$shelldir$(getcompfile $shell ponythink)"'"' + echo + done + + echo 'install-pdf:' + echo -en '\t' + echo 'install "ponysay.pdf" "$(INSTALLDIR)/doc/ponysay.pdf"' + echo + + echo 'install-info: infomanual' + echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/share/info"' + echo -en '\t' ; echo 'install "ponysay.info.gz" "$(INSTALLDIR)/share/info/ponysay.info.gz"' + echo -en '\t' ; echo 'install "ponysay.info.gz" "$(INSTALLDIR)/share/info/ponythink.info.gz"' + echo -en '\t' ; echo 'install-info --dir-file="$(INSTALLDIR)/share/info/dir" --entry="Miscellaneous" --description='"$INFODESC"' "$(INSTALLDIR)/share/info/ponysay.info.gz"' + echo -en '\t' ; echo 'install-info --dir-file="$(INSTALLDIR)/share/info/dir" --entry="Miscellaneous" --description='"$INFODESC"' "$(INSTALLDIR)/share/info/ponythink.info.gz"' + echo + + for man in $manFiles; do + lang="${man##*manpage}" + lang="${lang%%.6}" + mandir="${lang/\.//}" + echo 'install-man'"${lang/\./-}"': manpages' + echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/share/man'"$mandir"'/man6"' + echo -en '\t' ; echo 'install "'"$man"'.gz" "$(INSTALLDIR)/share/man'"$mandir"'/man6/ponysay.6.gz"' + echo -en '\t' ; echo 'ln -sf "ponysay.6.gz" "$(INSTALLDIR)/share/man'"$mandir"'/man6/ponythink.6.gz"' + echo + done + + cat < "ttyponies/\$\$pony" ;\\ + git add "ttyponies/\$\$pony" ;\\ + elif [ ! -f "ttyponies/\$\$pony" ]; then \\ + ln -s \`readlink "ponies/\$\$pony"\` "ttyponies/\$\$pony" ;\\ + git add "ttyponies/\$\$pony" ;\\ + 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 + +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 } makeMakefile > Makefile -#install-bash: ponythinkcompletion -# mkdir -p "$(INSTALLDIR)/share/bash-completion/completions/" -# install "completion/bash-completion.sh.install" "$(INSTALLDIR)/share/bash-completion/completions/ponysay" -# install "completion/bash-completion-think.sh" "$(INSTALLDIR)/share/bash-completion/completions/ponythink" -# -#install-zsh: ponythinkcompletion -# mkdir -p "$(INSTALLDIR)/share/zsh/site-functions/" -# install "completion/zsh-completion.zsh.install" "$(INSTALLDIR)/share/zsh/site-functions/_ponysay" -# install "completion/zsh-completion-think.zsh" "$(INSTALLDIR)/share/zsh/site-functions/_ponythink" -# -#install-fish: ponythinkcompletion -# mkdir -p "$(INSTALLDIR)/share/fish/completions/" -# install "completion/fish-completion.fish.install" "$(INSTALLDIR)/share/fish/completions/ponysay.fish" -# install "completion/fish-completion-think.fish" "$(INSTALLDIR)/share/fish/completions/ponythink.fish" -# -#install-man: manpages -# mkdir -p "$(INSTALLDIR)/share/man/man6" -# install "manuals/manpage.6.gz" "$(INSTALLDIR)/share/man/man6/ponysay.6.gz" -# ln -sf "ponysay.6.gz" "$(INSTALLDIR)/share/man/man6/ponythink.6.gz" -# -#install-man-es: manpages -# mkdir -p "$(INSTALLDIR)/share/man/es/man6" -# install "manuals/manpage.es.6.gz" "$(INSTALLDIR)/share/man/es/man6/ponysay.6.gz" -# ln -sf "ponysay.6.gz" "$(INSTALLDIR)/share/man/es/man6/ponythink.6.gz" -# -#install-info: infomanual -# mkdir -p "$(INSTALLDIR)/share/info" -# install "ponysay.info.gz" "$(INSTALLDIR)/share/info/ponysay.info.gz" -# install "ponysay.info.gz" "$(INSTALLDIR)/share/info/ponythink.info.gz" -# install-info --dir-file="$(INSTALLDIR)/share/info/dir" --entry="Miscellaneous" --description="My Little Ponies for your terminal" "$(INSTALLDIR)/share/info/ponysay.info.gz" -# install-info --dir-file="$(INSTALLDIR)/share/info/dir" --entry="Miscellaneous" --description="My Little Ponies for your terminal" "$(INSTALLDIR)/share/info/ponythink.info.gz" -# -#install-no-info: install-min install-bash install-zsh install-fish install-man install-man-es -# -#install-pdf: -# install "ponysay.pdf" "$(INSTALLDIR)/doc/ponysay.pdf" -# + #install: install-no-info install-info # @echo -e '\n\n'\ #'/--------------------------------------------------\\\n'\ @@ -207,17 +266,6 @@ makeMakefile > Makefile # if [ -f "$(INSTALLDIR)/share/info/ponythink.info.gz" ]; then unlink "$(INSTALLDIR)/share/info/ponythink.info.gz" ; fi # if [ -f "$(INSTALLDIR)/doc/ponysay.pdf" ]; then unlink "$(INSTALLDIR)/doc/ponysay.pdf" ; fi # -#uninstall-old: -# if [ -d "$(INSTALLDIR)/share/ponies" ]; then rm -fr "$(INSTALLDIR)/share/ponies" ; fi -# if [ -d "$(INSTALLDIR)/share/ttyponies" ]; then rm -fr "$(INSTALLDIR)/share/ttyponies" ; fi -# if [ -f "$(INSTALLDIR)/bin/ponysaytruncater" ]; then unlink "$(INSTALLDIR)/bin/ponysaytruncater" ; fi -# if [ -d "$(INSTALLDIR)/lib/ponysay/link.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/link.pl" ; fi -# if [ -d "$(INSTALLDIR)/lib/ponysay/linklist.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/linklist.pl" ; fi -# if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps" ; fi -# if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps.pl" ; fi -# if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps-list" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps-list" ; fi -# if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps-list.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps-list.pl" ; fi -# #clean: # if [ -f "truncater" ]; then rm -f "truncater" ; fi # if [ -f "completion/bash-completion-think.sh" ]; then rm -f "completion/bash-completion-think.sh" ; fi @@ -231,42 +279,17 @@ makeMakefile > Makefile # if [ -f "ponysay.info.gz" ]; then rm -f "ponysay.info.gz" ; fi # if [ -f "ponysay.py.install" ]; then rm -f "ponysay.py.install" ; fi # +#uninstall-old: +# if [ -d "$(INSTALLDIR)/share/ponies" ]; then rm -fr "$(INSTALLDIR)/share/ponies" ; fi +# if [ -d "$(INSTALLDIR)/share/ttyponies" ]; then rm -fr "$(INSTALLDIR)/share/ttyponies" ; fi +# if [ -f "$(INSTALLDIR)/bin/ponysaytruncater" ]; then unlink "$(INSTALLDIR)/bin/ponysaytruncater" ; fi +# if [ -d "$(INSTALLDIR)/lib/ponysay/link.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/link.pl" ; fi +# if [ -d "$(INSTALLDIR)/lib/ponysay/linklist.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/linklist.pl" ; fi +# if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps" ; fi +# if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps.pl" ; fi +# if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps-list" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps-list" ; fi +# if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps-list.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps-list.pl" ; fi +# #clean-old: # if [ -f "ponysaytruncater" ]; then rm -f "ponysaytruncater"; fi # -# -### Scripts for maintainers -# -#ttyponies: -# mkdir -p "ttyponies" -# for pony in $$(ls --color=no "ponies/"); do \ -# echo "building ttypony: $$pony" ;\ -# if [ `readlink "ponies/$$pony"` = "" ]; then \ -# ponysay2ttyponysay < "ponies/$$pony" | tty2colourfultty -c 1 -e > "ttyponies/$$pony" ;\ -# git add "ttyponies/$$pony" ;\ -# elif [ ! -f "ttyponies/$$pony" ]; then \ -# ln -s `readlink "ponies/$$pony"` "ttyponies/$$pony" ;\ -# git add "ttyponies/$$pony" ;\ -# 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 -# -#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/"*.* -# -- cgit From bb16937e998f4e41f7e45c4976b581a6c6d064ce Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 19 Aug 2012 01:14:33 +0200 Subject: ./configure prototype --- configure | 254 +++++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 160 insertions(+), 94 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 2868fb5..fc6af15 100755 --- a/configure +++ b/configure @@ -3,19 +3,37 @@ PREFIX="/usr" INFODESC=\''My Little Ponies for your terminal'\' -CPPFLAGS="" -CFLAGS="" -LDFLAGS="" - -compileMethods='all' completions='completion/bash-completion.sh completion/fish-completion.fish completion/zsh-completion.zsh' -shareDirs='ponies ttyponies quote' +shareDirs='ponies ttyponies quotes' manFiles='manuals/manpage.6 manuals/manpage.es.6' licenseFiles='COPYING' +oldInstalledFiles='bin/ponysaytruncater lib/ponysay/list.pl lib/ponysay/linklist.pl lib/ponysay/pq4ps lib/ponysay/pq4ps.pl lib/ponysay/pq4ps-list lib/ponysay/pq4ps-list.pl' +oldInstalledDirs='share/ponies share/ttyponies' +oldCompiledFiles='ponysaytruncater ponysay.install' +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='' + +for man in $manFiles; do + oldCompiledFiles="$oldCompiledFiles $man.gz" +done +for completion in $completions; do + thinkfile="${completion%%.*}-think.${completion##*.}" + compiledFiles="$compiledFiles $completion.install $thinkfile" +done +for file in $licenseFiles; do + installedFiles="$installedFiles share/licenses/ponysay/$file" +done + + + function getcompdir() { if [ "$1" == 'bash' ]; then echo -n 'bash-completion/completions' @@ -34,16 +52,51 @@ function getcompfile() +installPdf='' +installInfo=' install-info' +installMan=' install-man' +installManEs='' +installBash=' install-bash' +installFish=' install-fish' +installZsh=' install-zsh' + for arg in "$@"; do opt="${arg%%=*}" val="${arg##*=}" + if [ "$opt" = '--prefix' ]; then PREFIX="$val" elif [ "$opt" = '--info-desc' ]; then INFODESC=\'"$(sed -e s/\'/\''\\'\'\'/g <<<"$val")"\' + + elif [ "$opt" = '--with-pdf' ]; then installPdf=' install-pdf' + elif [ "$opt" = '--without-info' ]; then installInfo='' + elif [ "$opt" = '--without-man' ]; then installMan='' + elif [ "$opt" = '--with-man-es' ]; then installManEs=' install-man-es' + elif [ "$opt" = '--without-bash' ]; then installBash='' + elif [ "$opt" = '--without-fish' ]; then installFish='' + elif [ "$opt" = '--without-zsh' ]; then installZsh='' + + elif [ "$opt" = "--with-everyting" ]; then + installPdf=' install-pdf' + installInfo=' install-info' + installMan=' install-man' + installManEs=' install-man-es' + installBash=' install-bash' + installFish=' install-fish' + installZsh=' install-zsh' + + else + echo "$0: error: option not recongised: $arg" >&2 fi done +compileMethods='core truncater manpages ponysaycompletion ponythinkcompletion' +installMethods='install-min'"$installPdf$installInfo$installMan'$installManEs$installBash$installFish$installZsh" +if [ ! "$installInfo" = '' ]; then + compileMethods="$compileMethods infomanual" +fi + function correctPrefix() @@ -65,11 +118,11 @@ function gzCompress() function thinkCompletion() { for file in "$@"; do - echo -en '\tsed ' - echo -n '-e '\''s/ponysay/ponythink/g'\' - echo -n ' < "'"$file"'.install" | sed ' - echo -n '-e '\''s/\/ponythink\//\/ponysay\//g'\' - echo -n '-e '\''s/\\\/ponythink\\\//\\\/ponysay\\\//g'\' + echo -en '\tsed' + echo -n ' -e '\''s/ponysay/ponythink/g'\' + echo -n ' < "'"$file"'.install" | sed' + echo -n ' -e '\''s/\/ponythink\//\/ponysay\//g'\' + echo -n ' -e '\''s/\\\/ponythink\\\//\\\/ponysay\\\//g'\' thinkfile="${file%%.*}-think.${file##*.}" echo ' > "'"$thinkfile"'"' done @@ -77,20 +130,31 @@ function thinkCompletion() -echo "PREFIX = $PREFIX" -echo "INFODESC = $INFODESC" -echo "CPPFLAGS = $CPPFLAGS" -echo "CFLAGS = $CFLAGS" -echo "LDFLAGS = $LDFLAGS" +echo "PREFIX = $PREFIX, edit with option --prefix=PREFIX" +echo "INFODESC = $INFODESC, edit with option --info-desc=INFODESC" +echo +[ ! "$installPdf" = '' ] && echo "Installing PDF manual" +[ ! "$installInfo" = '' ] && echo "Installing info manual, add option --without-info to skip" +[ ! "$installMan" = '' ] && echo "Installing English manpage manual, add option --without-man to skip" +[ ! "$installManEs" = '' ] && echo "Installing Spanish manpage manual" +[ ! "$installBash" = '' ] && echo "Installing autocompletion for GNU Bash, add option --without-bash to skip" +[ ! "$installFish" = '' ] && echo "Installing autocompletion for fish, add option --without-fish to skip" +[ ! "$installZsh" = '' ] && echo "Installing autocompletion for zsh, add option --without-zsh to skip" +echo +[ ! "$installPdf" = '' ] || echo "Skipping PDF manual, add option --with-pdf to install" +[ ! "$installInfo" = '' ] || echo "Skipping info manual" +[ ! "$installMan" = '' ] || echo "Skipping English manpage manual" +[ ! "$installManEs" = '' ] || echo "Skipping Spanish manpage manual, add option --with-man-es to install" +[ ! "$installBash" = '' ] || echo "Skipping autocompletion for GNU Bash" +[ ! "$installFish" = '' ] || echo "Skipping autocompletion for fish" +[ ! "$installZsh" = '' ] || echo "Skipping autocompletion for zsh" +echo function makeMakefile() { echo 'PREFIX='\'"$PREFIX"\' - echo 'CPPFLAGS='\'"$CPPFLAGS"\' - echo 'CFLAGS='\'"$CFLAGS"\' - echo 'LDFLAGS='\'"$LDFLAGS"\' echo 'INSTALLDIR="$(DESTDIR)$(PREFIX)"' echo 'SED_PREFIX=$$(sed -e '\''s/\//\\\//g'\'' <<<$(PREFIX))' echo @@ -127,10 +191,10 @@ function makeMakefile() echo echo 'install-min: core truncater' - echo -en '\t' ; echo 'mkdir -p "'"$shareDir"'"' + echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/share/ponysay/"' for dir in $shareDirs; do - echo -en '\t' ; echo 'mkdir "$(INSTALLDIR)/share/ponysay/ponies'"$dir"'"' - echo -en '\t' ; echo 'cp -P "'"$dir"'/"*.* "$(INSTALLDIR)/share/ponysay/ponies'"$dir"'/"' + echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/share/ponysay/'"$dir"'"' + echo -en '\t' ; echo 'cp -P "'"$dir"'/"*.* "$(INSTALLDIR)/share/ponysay/'"$dir"'/"' done echo echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/bin/"' @@ -153,12 +217,13 @@ function makeMakefile() shell="${completion##*/}" shell="${shell%%-*}" thinkfile="${completion%%.*}-think.${completion##*.}" - shelldir='$(INSTALLDIR)/share/'"$(getcompdir $shell)"'/' + shelldir='share/'"$(getcompdir $shell)"'/' echo 'install-'"$shell"': ponysaycompletion ponythinkcompletion' - echo -en '\t' ; echo 'mkdir -p "'"$shelldir"'"' - echo -en '\t' ; echo 'install "'"$completion"'" "'"$shelldir$(getcompfile $shell ponysay)"'"' - echo -en '\t' ; echo 'install "'"$thinkfile"'" "'"$shelldir$(getcompfile $shell ponythink)"'"' + echo -en '\t' ; echo 'mkdir -p "$(INSTALLDIR)/'"$shelldir"'"' + echo -en '\t' ; echo 'install "'"$completion"'" "$(INSTALLDIR)/'"$shelldir$(getcompfile $shell ponysay)"'"' + echo -en '\t' ; echo 'install "'"$thinkfile"'" "$(INSTALLDIR)/'"$shelldir$(getcompfile $shell ponythink)"'"' echo + installedFiles="$installedFiles $shelldir$(getcompfile $shell ponysay) $shelldir$(getcompfile $shell ponythink)" done echo 'install-pdf:' @@ -183,8 +248,76 @@ function makeMakefile() echo -en '\t' ; echo 'install "'"$man"'.gz" "$(INSTALLDIR)/share/man'"$mandir"'/man6/ponysay.6.gz"' echo -en '\t' ; echo 'ln -sf "ponysay.6.gz" "$(INSTALLDIR)/share/man'"$mandir"'/man6/ponythink.6.gz"' echo + installedFiles="$installedFiles share/man$mandir/man6/ponysay.6.gz share/man$mandir/man6/ponythink.6.gz" done + echo + echo 'install: '"$installMethods" + echo -en '\t' ; echo '@echo -e \\n\\n\' + cat < Makefile - +makeMakefile > Makefile -#install: install-no-info install-info -# @echo -e '\n\n'\ -#'/--------------------------------------------------\\\n'\ -#'| ___ |\n'\ -#'| / (_) o |\n'\ -#'| \__ _ _ __ |\n'\ -#'| / / |/ | | / \_| | |\n'\ -#'| \___/ | |_/|/\__/ \_/|/ |\n'\ -#'| /| /| |\n'\ -#'| \| \| |\n'\ -#'| ____ |\n'\ -#'| | _ \ ___ _ __ _ _ ___ __ _ _ _ |\n'\ -#'| | |_) |/ _ \ | '\''_ \ | | | |/ __| / _` || | | | |\n'\ -#'| | __/| (_) || | | || |_| |\__ \| (_| || |_| | |\n'\ -#'| |_| \___/ |_| |_| \__, ||___/ \__,_| \__, | |\n'\ -#'| |___/ |___/ |\n'\ -#'\\--------------------------------------------------/' -# @echo 'dummy' | ./ponysay -f ./`if [[ "$$TERM" = "linux" ]]; then echo ttyponies; else echo ponies; fi`/pinkiecannon.pony | tail --lines=30 ; echo -e '\n' -# -#uninstall: -# if [ -d "$(INSTALLDIR)/share/ponysay" ]; then rm -fr "$(INSTALLDIR)/share/ponysay" ; fi -# if [ -d "$(INSTALLDIR)/lib/ponysay" ]; then rm -fr "$(INSTALLDIR)/lib/ponysay" ; fi -# if [ -f "$(INSTALLDIR)/bin/ponysay" ]; then unlink "$(INSTALLDIR)/bin/ponysay" ; fi -# if [ -f "$(INSTALLDIR)/bin/ponythink" ]; then unlink "$(INSTALLDIR)/bin/ponythink" ; fi -# if [ -f "$(INSTALLDIR)/share/licenses/ponysay/COPYING" ]; then unlink "$(INSTALLDIR)/share/licenses/ponysay/COPYING" ; fi -# if [ -f "$(INSTALLDIR)/share/bash-completion/completions/ponysay" ]; then unlink "$(INSTALLDIR)/share/bash-completion/completions/ponysay" ; fi -# if [ -f "$(INSTALLDIR)/share/bash-completion/completions/ponythink" ]; then unlink "$(INSTALLDIR)/share/bash-completion/completions/ponythink"; fi -# if [ -f "$(INSTALLDIR)/share/fish/completions/ponysay.fish" ]; then unlink "$(INSTALLDIR)/share/fish/completions/ponysay.fish" ; fi -# if [ -f "$(INSTALLDIR)/share/fish/completions/ponythink.fish" ]; then unlink "$(INSTALLDIR)/share/fish/completions/ponythink.fish" ; fi -# if [ -f "$(INSTALLDIR)/share/zsh/site-functions/_ponysay"; ]; then unlink "$(INSTALLDIR)/share/zsh/site-functions/_ponysay" ; fi -# if [ -f "$(INSTALLDIR)/share/zsh/site-functions/_ponythink"; ]; then unlink "$(INSTALLDIR)/share/zsh/site-functions/_ponythink" ; fi -# if [ -f "$(INSTALLDIR)/share/man/man6/ponysay.6.gz" ]; then unlink "$(INSTALLDIR)/share/man/man6/ponysay.6.gz" ; fi -# if [ -f "$(INSTALLDIR)/share/man/man6/ponythink.6.gz" ]; then unlink "$(INSTALLDIR)/share/man/man6/ponythink.6.gz" ; fi -# if [ -f "$(INSTALLDIR)/share/man/es/man6/ponysay.6.gz" ]; then unlink "$(INSTALLDIR)/share/man/es/man6/ponysay.6.gz" ; fi -# if [ -f "$(INSTALLDIR)/share/man/es/man6/ponythink.6.gz" ]; then unlink "$(INSTALLDIR)/share/man/es/man6/ponythink.6.gz" ; fi -# if [ -f "$(INSTALLDIR)/share/info/ponysay.info.gz" ]; then unlink "$(INSTALLDIR)/share/info/ponysay.info.gz" ; fi -# if [ -f "$(INSTALLDIR)/share/info/ponythink.info.gz" ]; then unlink "$(INSTALLDIR)/share/info/ponythink.info.gz" ; fi -# if [ -f "$(INSTALLDIR)/doc/ponysay.pdf" ]; then unlink "$(INSTALLDIR)/doc/ponysay.pdf" ; fi -# -#clean: -# if [ -f "truncater" ]; then rm -f "truncater" ; fi -# if [ -f "completion/bash-completion-think.sh" ]; then rm -f "completion/bash-completion-think.sh" ; fi -# if [ -f "completion/fish-completion-think.fish" ]; then rm -f "completion/fish-completion-think.fish" ; fi -# if [ -f "completion/zsh-completion-think.zsh" ]; then rm -f "completion/zsh-completion-think.zsh" ; fi -# if [ -f "completion/bash-completion.sh.install" ]; then rm -f "completion/bash-completion.sh.install" ; fi -# if [ -f "completion/fish-completion.fish.install" ]; then rm -f "completion/fish-completion.fish.install"; fi -# if [ -f "completion/zsh-completion.zsh.install" ]; then rm -f "completion/zsh-completion.zsh.install" ; fi -# if [ -f "manuals/manpage.6.gz" ]; then rm -f "manuals/manpage.6.gz" ; fi -# if [ -f "manuals/manpage.es.6.gz" ]; then rm -f "manuals/manpage.es.6.gz" ; fi -# if [ -f "ponysay.info.gz" ]; then rm -f "ponysay.info.gz" ; fi -# if [ -f "ponysay.py.install" ]; then rm -f "ponysay.py.install" ; fi -# -#uninstall-old: -# if [ -d "$(INSTALLDIR)/share/ponies" ]; then rm -fr "$(INSTALLDIR)/share/ponies" ; fi -# if [ -d "$(INSTALLDIR)/share/ttyponies" ]; then rm -fr "$(INSTALLDIR)/share/ttyponies" ; fi -# if [ -f "$(INSTALLDIR)/bin/ponysaytruncater" ]; then unlink "$(INSTALLDIR)/bin/ponysaytruncater" ; fi -# if [ -d "$(INSTALLDIR)/lib/ponysay/link.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/link.pl" ; fi -# if [ -d "$(INSTALLDIR)/lib/ponysay/linklist.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/linklist.pl" ; fi -# if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps" ; fi -# if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps.pl" ; fi -# if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps-list" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps-list" ; fi -# if [ -d "$(INSTALLDIR)/lib/ponysay/pq4ps-list.pl" ]; then unlink "$(INSTALLDIR)/lib/ponysay/pq4ps-list.pl" ; fi -# -#clean-old: -# if [ -f "ponysaytruncater" ]; then rm -f "ponysaytruncater"; fi -# -- cgit From 50a53b99aa368b2d69aea5eb6545fb5fcd8aa2dd Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 19 Aug 2012 03:16:13 +0200 Subject: misc --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index fc6af15..2581660 100755 --- a/configure +++ b/configure @@ -77,7 +77,7 @@ for arg in "$@"; do elif [ "$opt" = '--without-fish' ]; then installFish='' elif [ "$opt" = '--without-zsh' ]; then installZsh='' - elif [ "$opt" = "--with-everyting" ]; then + elif [ "$opt" = "--everything" ]; then installPdf=' install-pdf' installInfo=' install-info' installMan=' install-man' -- cgit 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 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'configure') 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 } -- cgit From 2e76f796590b672ddbd947bff5af85ad81a3b288 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 19 Aug 2012 06:31:10 +0200 Subject: make fix --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 2e65675..4db81de 100755 --- a/configure +++ b/configure @@ -92,7 +92,7 @@ for arg in "$@"; do done compileMethods='core truncater manpages ponysaycompletion ponythinkcompletion' -installMethods='install-min'"$installPdf$installInfo$installMan'$installManEs$installBash$installFish$installZsh" +installMethods='install-min'"$installPdf$installInfo$installMan$installManEs$installBash$installFish$installZsh" if [ ! "$installInfo" = '' ]; then compileMethods="$compileMethods infomanual" fi -- cgit From 5dde58685012ffaa5e280e025b088a0dd3395ddc Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 19 Aug 2012 19:36:00 +0200 Subject: kms fix (however not working because of some bug in util-say) --- configure | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 4db81de..db6229d 100755 --- a/configure +++ b/configure @@ -223,6 +223,9 @@ function makeMakefile() echo 'install "'"$file"'" "$(INSTALLDIR)/share/licenses/ponysay/'"$file"'"' done echo + echo -en '\t' ; echo 'mkdir -p $(DESTDIR)/var/cache/ponysay/' + echo -en '\t' ; echo 'chmod 777 $(DESTDIR)/var/cache/ponysay/' + echo for completion in $completions; do shell="${completion##*/}" @@ -286,6 +289,7 @@ EOF echo echo 'uninstall:' + echo -en '\t' ; echo 'if [ -d "$(DESTDIR)/var/cache/ponysay" ]; then rm -rf "$(INSTALLDIR)/var/cache/ponysay"; fi' for old in $installedDirs; do echo -en '\t' echo 'if [ -d "$(INSTALLDIR)/'"$old"'" ]; then rm -rf "$(INSTALLDIR)/'"$old"'"; fi' -- cgit