mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-23 04:47:59 +01:00
m make
This commit is contained in:
parent
578c5b24a8
commit
a2bd6fee37
2 changed files with 15 additions and 9 deletions
14
Makefile
14
Makefile
|
@ -2,7 +2,10 @@ PREFIX="/usr"
|
||||||
INSTALLDIR="$(DESTDIR)$(PREFIX)"
|
INSTALLDIR="$(DESTDIR)$(PREFIX)"
|
||||||
|
|
||||||
|
|
||||||
all: truncater manpages infomanual ponythinkcompletion
|
all: core truncater manpages infomanual ponythinkcompletion
|
||||||
|
|
||||||
|
core:
|
||||||
|
sed -e 's/'\''\/usr\//'"$$(sed -e 's/'\''\//\\\//g' <<<$(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"
|
||||||
|
@ -16,16 +19,16 @@ 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 -e 's/'\''\//\\\//g' <<<$(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 -e 's/'\''\//\\\//g' <<<$(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 -e 's/'\''\//\\\//g' <<<$(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"
|
||||||
sed -e 's/ponysay/ponythink/g' <"completion/fish-completion.fish.install" | sed -e 's/\/ponythink\//\/ponysay\//g' -e 's/\\\/ponythink\\\//\\\/ponysay\\\//g' >"completion/fish-completion-think.fish"
|
sed -e 's/ponysay/ponythink/g' <"completion/fish-completion.fish.install" | sed -e 's/\/ponythink\//\/ponysay\//g' -e 's/\\\/ponythink\\\//\\\/ponysay\\\//g' >"completion/fish-completion-think.fish"
|
||||||
sed -e 's/ponysay/ponythink/g' <"completion/zsh-completion.zsh.install" | sed -e 's/\/ponythink\//\/ponysay\//g' -e 's/\\\/ponythink\\\//\\\/ponysay\\\//g' >"completion/zsh-completion-think.zsh"
|
sed -e 's/ponysay/ponythink/g' <"completion/zsh-completion.zsh.install" | sed -e 's/\/ponythink\//\/ponysay\//g' -e 's/\\\/ponythink\\\//\\\/ponysay\\\//g' >"completion/zsh-completion-think.zsh"
|
||||||
|
|
||||||
install-min: truncater
|
install-min: core truncater
|
||||||
mkdir -p "$(INSTALLDIR)/share/ponysay/"
|
mkdir -p "$(INSTALLDIR)/share/ponysay/"
|
||||||
mkdir -p "$(INSTALLDIR)/share/ponysay/ponies"
|
mkdir -p "$(INSTALLDIR)/share/ponysay/ponies"
|
||||||
mkdir -p "$(INSTALLDIR)/share/ponysay/ttyponies"
|
mkdir -p "$(INSTALLDIR)/share/ponysay/ttyponies"
|
||||||
|
@ -36,6 +39,7 @@ install-min: truncater
|
||||||
|
|
||||||
mkdir -p "$(INSTALLDIR)/bin/"
|
mkdir -p "$(INSTALLDIR)/bin/"
|
||||||
install "ponysay" "$(INSTALLDIR)/bin/ponysay"
|
install "ponysay" "$(INSTALLDIR)/bin/ponysay"
|
||||||
|
install "ponysay.py" "$(INSTALLDIR)/bin/ponysay.py"
|
||||||
ln -sf "ponysay" "$(INSTALLDIR)/bin/ponythink"
|
ln -sf "ponysay" "$(INSTALLDIR)/bin/ponythink"
|
||||||
|
|
||||||
mkdir -p "$(INSTALLDIR)/lib/ponysay/"
|
mkdir -p "$(INSTALLDIR)/lib/ponysay/"
|
||||||
|
|
4
ponysay
4
ponysay
|
@ -1,7 +1,9 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
INSTALLDIR="$(dirname $( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd ))"
|
INSTALLDIR="$(dirname $( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd ))"
|
||||||
truncatercmd="$INSTALLDIR/lib/ponysay/truncater"
|
LIBDIR="$INSTALLDIR/lib/ponysay"
|
||||||
|
|
||||||
|
truncatercmd="$LIBDIR/truncater"
|
||||||
|
|
||||||
scrw=`(stty size <&2 || echo 0 0) | cut -d ' ' -f 2` # Screen width
|
scrw=`(stty size <&2 || echo 0 0) | cut -d ' ' -f 2` # Screen width
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue