Migration to /usr/share/ponysay/{,tty}ponies (need more reviews)

This commit is contained in:
Pablo Lezaeta 2012-07-04 23:30:29 -04:00
parent aa0b3c676d
commit 4063e82a15
4 changed files with 12 additions and 11 deletions

View file

@ -4,10 +4,11 @@ ponysaytruncater:
gcc -o "ponysaytruncater" "ponysaytruncater.c" gcc -o "ponysaytruncater" "ponysaytruncater.c"
install: all install: all
mkdir -p "$(DESTDIR)/usr/share/ponies" mkdir -p "$(DESTDIR)/usr/share/ponysay/"
mkdir -p "$(DESTDIR)/usr/share/ttyponies" mkdir -p "$(DESTDIR)/usr/share/ponysay/ponies"
cp ponies/*.pony "$(DESTDIR)/usr/share/ponies/" mkdir -p "$(DESTDIR)/usr/share/ponysay/ttyponies"
cp ttyponies/*.pony "$(DESTDIR)/usr/share/ttyponies/" cp ponies/*.pony "$(DESTDIR)/usr/share/ponysay/ponies/"
cp ttyponies/*.pony "$(DESTDIR)/usr/share/ponysay/ttyponies/"
mkdir -p "$(DESTDIR)/usr/bin/" mkdir -p "$(DESTDIR)/usr/bin/"
install "ponysay" "$(DESTDIR)/usr/bin/ponysay" install "ponysay" "$(DESTDIR)/usr/bin/ponysay"
@ -24,8 +25,8 @@ install: all
install "COPYING" "$(DESTDIR)/usr/share/licenses/ponysay/COPYING" install "COPYING" "$(DESTDIR)/usr/share/licenses/ponysay/COPYING"
uninstall: uninstall:
rm -fr "$(DESTDIR)/usr/share/ponies" rm -fr "$(DESTDIR)/usr/share/ponysay/ponies"
rm -fr "$(DESTDIR)/usr/share/ttyponies" rm -fr "$(DESTDIR)/usr/share/ponysay/ttyponies"
unlink "$(DESTDIR)/usr/bin/ponysay" unlink "$(DESTDIR)/usr/bin/ponysay"
unlink "$(DESTDIR)/usr/bin/ponysaytruncater" unlink "$(DESTDIR)/usr/bin/ponysaytruncater"
unlink "$(DESTDIR)/usr/bin/ponythink" unlink "$(DESTDIR)/usr/bin/ponythink"

View file

@ -10,10 +10,10 @@ _ponysay()
if [[ $prev = "-f" ]]; then if [[ $prev = "-f" ]]; then
COMPREPLY=() COMPREPLY=()
sysponies=/usr/share/ponies/ sysponies=/usr/share/ponysay/ponies/
usrponies=~/.ponies/ usrponies=~/.ponies/
if [[ $TERM = "linux" ]]; then if [[ $TERM = "linux" ]]; then
sysponies=/usr/share/ttyponies/ sysponies=/usr/share/ponysay/ttyponies/
usrponies=~/.ttyponies/ usrponies=~/.ttyponies/
fi fi

View file

@ -3,7 +3,7 @@ _shortopts=(
'-v[Show version and exit]' '-v[Show version and exit]'
'-h[Show this help and exit]' '-h[Show this help and exit]'
'-l[list ponyfiles]' '-l[list ponyfiles]'
'-f[Select a pony (either a filename or a ponyname]: :_path_files -W "/usr/share/ponies" -g "*(\:r)"' '-f[Select a pony (either a filename or a ponyname]: :_path_files -W "/usr/share/ponysay/ponies" -g "*(\:r)"'
'-W[The screen column where the message should be wrapped]' '-W[The screen column where the message should be wrapped]'
) )
_arguments -s : \ _arguments -s : \

View file

@ -1,13 +1,13 @@
#!/usr/bin/env bash #!/usr/bin/env bash
version=0.9 version=0.9
SYSTEMPONIES=/usr/share/ponies SYSTEMPONIES=/usr/share/ponysay/ponies
HOMEPONIES="${HOME}/.ponies" HOMEPONIES="${HOME}/.ponies"
pony="*" pony="*"
wrap= wrap=
if [ "$TERM" = "linux" ]; then if [ "$TERM" = "linux" ]; then
SYSTEMPONIES=/usr/share/ttyponies SYSTEMPONIES=/usr/share/ponysay/ttyponies
HOMEPONIES="${HOME}/.ttyponies" HOMEPONIES="${HOME}/.ttyponies"
fi fi