aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2012-07-17 19:11:35 +0200
committerMattias Andrée <maandree@operamail.com>2012-07-17 19:11:35 +0200
commitd22dd8dd260e59d6c5e5cb88d62c6d0b33992501 (patch)
treec15b9d7dbdbe16ae53e2017afda0183de15a2090
parenta29defcd148807b18eaf6f35b2bf20d8e6c4ac52 (diff)
downloadponysay-d22dd8dd260e59d6c5e5cb88d62c6d0b33992501.tar.gz
ponysay-d22dd8dd260e59d6c5e5cb88d62c6d0b33992501.tar.bz2
ponysay-d22dd8dd260e59d6c5e5cb88d62c6d0b33992501.zip
ttyponies.sh merged into Makefile
-rw-r--r--Makefile15
-rw-r--r--README6
-rwxr-xr-xttyponies.sh11
3 files changed, 17 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index af9fab3..cf34e18 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,26 @@
all: ponysaytruncater manpages
+
ponysaytruncater:
gcc -o "ponysaytruncater" "ponysaytruncater.c"
+
manpages:
gzip -9 < manuals/manpage.6 > manuals/manpage.6.gz
gzip -9 < manuals/manpage.es.6 > manuals/manpage.es.6.gz
+
ttyponies:
mkdir -p ttyponies
- ./ttyponies.sh
+ 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" ;\
+ elif [[ ! -f "ttyponies/$$pony" ]]; then \
+ ln -s `readlink "ponies/$$pony"` "ttyponies/$$pony" ;\
+ fi \
+ done
+
install: all
mkdir -p "$(DESTDIR)/usr/share/ponysay/"
@@ -58,6 +69,7 @@ install: all
'\\--------------------------------------------------/'
@echo '' | ./ponysay -f ./`if [[ "$$TERM" = "linux" ]]; then echo ttyponies; else echo ponies; fi`/pinkiecannon.pony | tail --lines=30 ; echo -e '\n'
+
uninstall:
rm -fr "$(DESTDIR)/usr/share/ponysay/ponies"
rm -fr "$(DESTDIR)/usr/share/ponysay/ttyponies"
@@ -72,6 +84,7 @@ uninstall:
unlink "$(DESTDIR)/usr/share/man/es/man6/ponysay.6.gz"
unlink "$(DESTDIR)/usr/share/man/es/man6/ponythink.6.gz"
+
clean:
rm -f "ponysaytruncater"
rm manuals/manpage.6.gz
diff --git a/README b/README
index 13a9789..8a7fb6f 100644
--- a/README
+++ b/README
@@ -51,11 +51,11 @@ Package building dependencies
Dependencies for pony providers
===============================
- make : required to run `make ttyponies`
+ make : required to run `make -B ttyponies`
- coreutils : ln and readlink are used in ttyponies.sh
+ coreutils : ln and readlink are used in the ttyponies subscript
- bash : required to run ttyponies.sh
+ bash : used in the ttyponies subscript
util-say : used by ttyponies.sh to builder ttyponies from xterm ponies
-- Available for Arch:ers in AUR as util-say-git (https://aur.archlinux.org/packages.php?ID=60241)
diff --git a/ttyponies.sh b/ttyponies.sh
deleted file mode 100755
index 4913119..0000000
--- a/ttyponies.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-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"
- elif [[ ! -f "ttyponies/$pony" ]]; then
- ln -s `readlink "ponies/$pony"` "ttyponies/$pony"
- fi
-done
-