pipeseroni / pipes.sh

Animated pipes terminal screensaver
https://pipeseroni.github.io/
MIT License
2.45k stars 75 forks source link

allow setting the installation location by environment variable #64

Closed techhazard closed 6 years ago

techhazard commented 6 years ago

I wanted to install in ~/.local/bin, but that looked impossible. So I looked into it, and a simple ? solved my problem :smile:

This allowed me to override the PREFIX variable like so:

$ PREFIX=~/.local make install
test -d /home/$USER/.local || mkdir -p /home/$USER/.local
test -d /home/$USER/.local/bin || mkdir -p /home/$USER/.local/bin
test -d /home/$USER/.local/share/man/man6 || mkdir -p /home/$USER/.local/share/man/man6
install -m 0755 pipes.sh /home/$USER/.local/bin
install -m 0644 pipes.sh.6 /home/$USER/.local/share/man/man6

$ make install PREFIX=~/local works as well

You can still use the default

$ make install
test -d /usr/local || mkdir -p /usr/local
test -d /usr/local/bin || mkdir -p /usr/local/bin
test -d /usr/local/share/man/man6 || mkdir -p /usr/local/share/man/man6
install -m 0755 pipes.sh /usr/local/bin
install -m 0644 pipes.sh.6 /usr/local/share/man/man6
techhazard commented 6 years ago

Apparently I did not read the readme well enough :sweat_smile: