This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| # encoding: utf-8 | |
| # | |
| # Copyright (c) 2013 <deanishe@deanishe.net>. | |
| # | |
| # MIT Licence. See http://opensource.org/licenses/MIT | |
| # | |
| # Created on 2013-11-01 | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The following functions append/prepend the specified directory to the path variable specified by name | |
| # If the directory is already in the path, it is first removed and then appended/prepended. | |
| # Examples: | |
| # | |
| # Prepend `~/bin` to `$PATH`: | |
| # prepend_path PATH ~/bin | |
| # | |
| # Append `~bin` to `$PATH` instead: | |
| # append_path PATH ~/bin | |
| # (this will remove `~/bin` from the beginning of `$PATH` first) |