#!/bin/sh

# all done with the install, just a a few things left to do.
#

# Add /usr/local/bin to your path if it isn't already

grep -q -s '/usr/local/bin' ~/.profile
if [ $? == 1 ]; then
    echo "" >> ~/.profile
    echo "" >> ~/.profile
    echo "##" >> ~/.profile
    echo "# this will add /usr/local/bin to your \"PATH\"" >> ~/.profile
    echo "# the PATH is where OS X looks for commands you enter," >> ~/.profile
    echo "# searching each item on the list in turn." >> ~/.profile
    echo "#" >> ~/.profile
    echo "# added by the corz wee script pack installer" >> ~/.profile
    echo "#" >> ~/.profile
    echo "echo \$PATH | grep -q -s '/usr/local/bin'" >> ~/.profile
    echo "if [ \$? == 1 ] ; then" >> ~/.profile
    echo "    PATH=\$PATH:/usr/local/bin" >> ~/.profile
    echo "    export PATH" >> ~/.profile
    echo "fi" >> ~/.profile
    echo "#" >> ~/.profile
    echo "# if /usr/local/bin is already in your PATH," >> ~/.profile
    echo "# this section does exactly nothing." >> ~/.profile
    echo "##" >> ~/.profile
    echo "" >> ~/.profile
fi

# /usr/local/bin/ is for YOUR stuff! get in there and edit!
sudo chown root:admin /usr/local/bin/*
sudo chmod 775 /usr/local/bin/* 
