Mac Leopardã®bashã«é¢ããè¨å®ãã¡ã¤ã«(.bash_profile .bashrc ãªã©)ãã¾ã¨ãã¦ã¿ã
Mac Leopardã«Flex SDKãå
¥ããæã«ç°å¢å¤æ°ã®PATHãããã£ããã©ããã®æã¡ããã¨è¨å®ãã¦ãªãã¯ãã®MacPortsç¨ã®PATHãè¨å®ããã¦ãäºã«æ°ãã¤ãã¾ããã
ã§ãFlex SDKç¨ã®PATHãè¨å®ããããMacPortsç¨ã®è¨å®ãæ¶ãã¦ãã¾ããä¸æè°ã«æã£ãã®ã§èª¿ã¹ã¦ã¿ã¾ããã
çµè«
Flex SDKç¨ã®PATHãè¨è¿°ããããã« ~/.bash_profile ãä½æããäºã§ãMacPortsã®ã¤ã³ã¹ãã¼ã©ã¼ãç¨æãã ~/.profile ãèªã¿è¾¼ã¾ããªããªã£ãäºãåå ã§ããã
MacPortsã¯ã¤ã³ã¹ãã¼ã«å¾ã«èªåã§PATHã«è¿½å ããå¿
è¦ãããã¨èª¬æããæãããã¾ããããæãããã¨ã㨠~/.bash_profile ã ~/.bash_login ãä½ã£ã¦ããç°å¢ã ã£ãããããç¥ãã¾ããã
ãããã¯ãæã®MacPortsã§ã¯ããã ã£ãã®ããã
èªã¿è¾¼ã¿é åº
UNIXãã¼ã¹ãªã®ã§åºæ¬ã¯ãã®è¾ºã¨åãã ã¨æãã¾ãã
UNIXçãªã«ã¼ã«ã¨ãå®é¨ãã¦ã¿ãçµæãå
ã«ãäºæ³ãå«ã¿ã¤ã¤ãã¼ããããé çªãæ´çãã¦ã¿ã¾ããã
- /etc/profile
- UNIXãªã®ã§å¤åæåã«ãã¼ãããã
- /etc/paths
- /etc/profile å 㧠/usr/libexec/path_helperãå¼ã°ãããã®çµæãã¼ãããã
- /etc/paths.d/*
- /etc/profile å 㧠/usr/libexec/path_helperãå¼ã°ãããã®çµæãã¼ãããã
- /etc/bashrc
- /etc/profile å 㧠ã. /etc/bashrcã ããã¦ããã
- ~/.bash_profile
- /etc/profile ããç®ã§ã¯çµããªãããUNIXãªã®ã§å¤åãã¼ãããã
- ~/.bash_login
- ~/.bash_profile ãåå¨ããªãå ´åãå¤åãã¼ãããã
- ~/.profile
- ~/.bash_login ãåå¨ããªãå ´åãå¤åãã¼ãããã
- ~/.bashrc
- ä¸è¨3ãã¡ã¤ã«å ãããsource .bashrcããªã©ãã¡ããã¨æ¸ãã¦ãã¼ããã
ç¬ç¹ã ãªã¨æã£ãã®ã¯å¤§ä½ãããªæã§ãã
- /etc/bashrc 㯠/etc/profile å ããæ示çã«ãã¼ãããã¦ãã
- ~/.bashrc ã¯ã©ããã§ãã¼ãããããæ¸ããªãã¨ãèªã¿è¾¼ã¾ããªã
- /etc/paths ã¨ããä»çµã¿
MacPorts
MacPortsãdmgã¤ã¡ã¼ã¸ã使ã£ã¦ã¤ã³ã¹ãã¼ã«ããã¨ãèªåçã«PATHãè¨å®ãã¦ããã¾ãã
ãã ããã®æ¹æ³ã ~/.profile ã®ä½æãªã®ã§ã~/.bash_profile ãªã©ãå¨ãã¨èªã¿è¾¼ã¾ãã¾ããã
ãã®äºã¯ãMacPortsã®ã¤ã³ã¹ãã¼ã«ã®è§£èª¬ã«ãæ¸ãã¦ããã¾ããã
~/.bash_profile ã ~/.bash_login ãä½ããªããèªåã§ãã¼ã¸ãããã¨ã®äºã§ãã
The MacPorts binary installer places a .profile file in your home directory (view files preceded by a dot with 'ls -a'). The contents of this ~/.profile file adds the MacPorts paths in front of the standard Unix paths for the default BASH shell. This is done so that if you have utilities or libraries from both MacPorts and OS X's standard install, the MacPorts libraries will be run instead of the ones provided by Apple.
export PATH=/opt/local/bin:/opt/local/sbin:$PATHhttp://trac.macports.org/wiki/InstallingMacPorts#RequirementsfortheMacPortsshellenvironment
Other profile files may take precedence over ~/.profile. If you are using one of the following profile files in your home directory, you will need to merge the contents of it into ~./profile, or vice versa because the shell will ignore one of them:
http://trac.macports.org/wiki/InstallingMacPorts#RequirementsfortheMacPortsshellenvironment
~/.bash_login
~/.bash_profile
path_helper
path_helper ã«ã¤ãã¦ã¯ãåãã¾ã¨ã¾ã£ã¦ãã¨ã³ããªã¼ãããã¾ããã
ãªããã¡ãã£ã¨ããå æ¸ãªã³ã¡ã³ãã§ãããã½ã¼ã¹ãèªãã¨ã/etc/pathsãæ¸ãæããã/etc/paths.dã«ãã¡ã¤ã«ãç½®ããã¨ã§PATHãè¨å®ãããã¨ãã§ããããã§ãã/etc/pathsãã¡ã¤ã«ã«åªå 度ã®é«ããã¹ãæ¸ãã/etc/paths.dãã£ã¬ã¯ããªä»¥ä¸ã«åªå 度ã®ä½ããã¹ãæ¸ããããã¡ã¤ã«ãç½®ãã¾ããpath.d以ä¸ã®ãã¡ã¤ã«ã¯ã¢ã«ãã¡ãããé ã«èªã¿è¾¼ã¾ãã¾ãã
ããã¯Leopardãã追å ããããã¹ã®ç®¡çæ¹æ³ã¿ããã§ãã
最近のMac OSXで、PATHをスマート(?)に管理するやり方。 - こせきの技術日記
*1:ãã¤ã ã£ããå¿ãã¾ãã