grc - update rc script
* Don't use DATA to write out the rc script * Put it in prefix/etc instead of etcmaster
parent
d68fd0ad66
commit
11b3a33ab6
|
@ -15,30 +15,32 @@ class Grc <Formula
|
|||
(share+'grc').install Dir['conf.*']
|
||||
man1.install %w[grc.1 grcat.1]
|
||||
|
||||
(etc+'grc.bashrc').write DATA.read rescue RuntimeError
|
||||
(prefix+'etc/grc.bashrc').write rc_script
|
||||
end
|
||||
|
||||
def rc_script; <<-EOS.undent
|
||||
GRC=`which grc`
|
||||
if [ "$TERM" != dumb ] && [ -n GRC ]
|
||||
then
|
||||
alias colourify="$GRC -es --colour=auto"
|
||||
alias configure='colourify ./configure'
|
||||
alias diff='colourify diff'
|
||||
alias make='colourify make'
|
||||
alias gcc='colourify gcc'
|
||||
alias g++='colourify g++'
|
||||
alias as='colourify as'
|
||||
alias gas='colourify gas'
|
||||
alias ld='colourify ld'
|
||||
alias netstat='colourify netstat'
|
||||
alias ping='colourify ping'
|
||||
alias traceroute='colourify /usr/sbin/traceroute'
|
||||
fi
|
||||
EOS
|
||||
end
|
||||
|
||||
def caveats; <<-EOS.undent
|
||||
New shell sessions will start using GRC after you run the following command:
|
||||
echo 'source "`brew --prefix`/etc/grc.bashrc"' >> ~/.bashrc
|
||||
echo 'source "`brew --prefix grc`/etc/grc.bashrc"' >> ~/.bashrc
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
||||
__END__
|
||||
GRC=`which grc`
|
||||
if [ "$TERM" != dumb ] && [ -n GRC ]
|
||||
then
|
||||
alias colourify="$GRC -es --colour=auto"
|
||||
alias configure='colourify ./configure'
|
||||
alias diff='colourify diff'
|
||||
alias make='colourify make'
|
||||
alias gcc='colourify gcc'
|
||||
alias g++='colourify g++'
|
||||
alias as='colourify as'
|
||||
alias gas='colourify gas'
|
||||
alias ld='colourify ld'
|
||||
alias netstat='colourify netstat'
|
||||
alias ping='colourify ping'
|
||||
alias traceroute='colourify /usr/sbin/traceroute'
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue