mirror of
https://github.com/erkin/ponysay.git
synced 2024-12-02 00:27:59 +01:00
make fix + m
This commit is contained in:
parent
27f266731f
commit
3d7768e2ef
2 changed files with 12 additions and 11 deletions
13
Makefile
13
Makefile
|
@ -1,11 +1,11 @@
|
||||||
PREFIX="/usr"
|
PREFIX="/usr"
|
||||||
INSTALLDIR="$(DESTDIR)$(PREFIX)"
|
INSTALLDIR="$(DESTDIR)$(PREFIX)"
|
||||||
|
SED_PREFIX=$$(sed -e 's/\//\\\//g' <<<$(PREFIX))
|
||||||
|
|
||||||
all: core truncater manpages infomanual ponythinkcompletion
|
all: core truncater manpages infomanual ponythinkcompletion
|
||||||
|
|
||||||
core:
|
core:
|
||||||
sed -e 's/'\''\/usr\//'"$$(sed -e 's/'\''\//\\\//g' <<<$(PREFIX))"'\//g' <"ponysay.py" >"ponysay.py.install"
|
sed -e 's/'\''\/usr\//'\'"$(SED_PREFIX)"'\//g' <"ponysay.py" >"ponysay.py.install"
|
||||||
|
|
||||||
truncater:
|
truncater:
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o "truncater" "truncater.c"
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o "truncater" "truncater.c"
|
||||||
|
@ -19,9 +19,9 @@ infomanual:
|
||||||
gzip -9 -f "ponysay.info"
|
gzip -9 -f "ponysay.info"
|
||||||
|
|
||||||
ponysaycompletion:
|
ponysaycompletion:
|
||||||
sed -e 's/'\''\/usr\//'"$$(sed -e 's/'\''\//\\\//g' <<<$(PREFIX))"'\//g' <"completion/bash-completion.sh" >"completion/bash-completion.sh.install"
|
sed -e 's/'\''\/usr\//'\'"$(SED_PREFIX)"'\//g' <"completion/bash-completion.sh" >"completion/bash-completion.sh.install"
|
||||||
sed -e 's/'\''\/usr\//'"$$(sed -e 's/'\''\//\\\//g' <<<$(PREFIX))"'\//g' <"completion/fish-completion.fish" >"completion/fish-completion.fish.install"
|
sed -e 's/'\''\/usr\//'\'"$(SED_PREFIX)"'\//g' <"completion/fish-completion.fish" >"completion/fish-completion.fish.install"
|
||||||
sed -e 's/'\''\/usr\//'"$$(sed -e 's/'\''\//\\\//g' <<<$(PREFIX))"'\//g' <"completion/zsh-completion.zsh" >"completion/zsh-completion.zsh.install"
|
sed -e 's/'\''\/usr\//'\'"$(SED_PREFIX)"'\//g' <"completion/zsh-completion.zsh" >"completion/zsh-completion.zsh.install"
|
||||||
|
|
||||||
ponythinkcompletion: ponysaycompletion
|
ponythinkcompletion: ponysaycompletion
|
||||||
sed -e 's/ponysay/ponythink/g' <"completion/bash-completion.sh.install" | sed -e 's/\/ponythink\//\/ponysay\//g' -e 's/\\\/ponythink\\\//\\\/ponysay\\\//g' >"completion/bash-completion-think.sh"
|
sed -e 's/ponysay/ponythink/g' <"completion/bash-completion.sh.install" | sed -e 's/\/ponythink\//\/ponysay\//g' -e 's/\\\/ponythink\\\//\\\/ponysay\\\//g' >"completion/bash-completion-think.sh"
|
||||||
|
@ -41,6 +41,7 @@ install-min: core truncater
|
||||||
install "ponysay" "$(INSTALLDIR)/bin/ponysay"
|
install "ponysay" "$(INSTALLDIR)/bin/ponysay"
|
||||||
install "ponysay.py" "$(INSTALLDIR)/bin/ponysay.py"
|
install "ponysay.py" "$(INSTALLDIR)/bin/ponysay.py"
|
||||||
ln -sf "ponysay" "$(INSTALLDIR)/bin/ponythink"
|
ln -sf "ponysay" "$(INSTALLDIR)/bin/ponythink"
|
||||||
|
ln -sf "ponysay.py" "$(INSTALLDIR)/bin/ponythink.py"
|
||||||
|
|
||||||
mkdir -p "$(INSTALLDIR)/lib/ponysay/"
|
mkdir -p "$(INSTALLDIR)/lib/ponysay/"
|
||||||
install -s "truncater" "$(INSTALLDIR)/lib/ponysay/truncater"
|
install -s "truncater" "$(INSTALLDIR)/lib/ponysay/truncater"
|
||||||
|
@ -102,7 +103,7 @@ install: install-no-info install-info
|
||||||
'| |_| \___/ |_| |_| \__, ||___/ \__,_| \__, | |\n'\
|
'| |_| \___/ |_| |_| \__, ||___/ \__,_| \__, | |\n'\
|
||||||
'| |___/ |___/ |\n'\
|
'| |___/ |___/ |\n'\
|
||||||
'\\--------------------------------------------------/'
|
'\\--------------------------------------------------/'
|
||||||
@echo '' | ./ponysay -f ./`if [[ "$$TERM" = "linux" ]]; then echo ttyponies; else echo ponies; fi`/pinkiecannon.pony | tail --lines=30 ; echo -e '\n'
|
@echo 'dummy' | ./ponysay -f ./`if [[ "$$TERM" = "linux" ]]; then echo ttyponies; else echo ponies; fi`/pinkiecannon.pony | tail --lines=30 ; echo -e '\n'
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
if [ -d "$(INSTALLDIR)/share/ponysay" ]; then rm -fr "$(INSTALLDIR)/share/ponysay" ; fi
|
if [ -d "$(INSTALLDIR)/share/ponysay" ]; then rm -fr "$(INSTALLDIR)/share/ponysay" ; fi
|
||||||
|
|
|
@ -25,7 +25,7 @@ from subprocess import Popen, PIPE
|
||||||
'''
|
'''
|
||||||
The version of ponysay
|
The version of ponysay
|
||||||
'''
|
'''
|
||||||
VERSION = '2.0-alpha'
|
VERSION = '2.0-rc1'
|
||||||
|
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
@ -49,7 +49,7 @@ linuxvt = os.environ['TERM'] == 'linux'
|
||||||
'''
|
'''
|
||||||
Whether the program is launched in subshell/being redirected
|
Whether the program is launched in subshell/being redirected
|
||||||
'''
|
'''
|
||||||
redirected = not sys.stdout.isatty()
|
redirected = False #not sys.stdout.isatty() # currently impossible, we need to get rid of the little shell script first
|
||||||
|
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
@ -77,7 +77,7 @@ for quotedir in _quotedirs:
|
||||||
'''
|
'''
|
||||||
Argument parsing
|
Argument parsing
|
||||||
'''
|
'''
|
||||||
parser = argparse.ArgumentParser(prog = 'ponysay', description = 'Like cowsay with ponies.')
|
parser = argparse.ArgumentParser(prog = 'ponysay', description = 'cowsay wrapper for ponies')
|
||||||
|
|
||||||
parser.add_argument('-v', '--version', action = 'version', version = '%s %s' % ('ponysay', VERSION))
|
parser.add_argument('-v', '--version', action = 'version', version = '%s %s' % ('ponysay', VERSION))
|
||||||
parser.add_argument('-l', '--list', action = 'store_true', dest = 'list', help = 'list pony files')
|
parser.add_argument('-l', '--list', action = 'store_true', dest = 'list', help = 'list pony files')
|
||||||
|
|
Loading…
Reference in a new issue