在主目录以外的地方安装dotfiles

时间:2014-01-15 02:07:43

标签: macos path terminal location dotfiles

嘿我正在尝试安装这些dotfiles https://github.com/mathiasbynens/dotfiles

安装时,它会通过bootstrap.sh自动将所有内容解压缩到我的主目录。

我不希望它们在这里解压缩我需要一个替代位置,但是当我在rsync命令中更改位置时:

rsync --exclude ".git/" --exclude ".DS_Store" --exclude "bootstrap.sh" \
                --exclude "README.md" --exclude "LICENSE-MIT.txt" -av --no-perms . ~
        source ~/.bash_profile

点文件不适用,因为终端不默认为新的.bash_profile,因为它不在主目录中。

我需要知道如何将终端应用程序指向新的.bash_profile我认为

1 个答案:

答案 0 :(得分:0)

只需从您家中的新.bash_profile获取新内容。附加

[ -f /path/to/rsynced/.bash_profile ] && . /path/to/rsynced/.bash_profile

到您的~/.bash_profile(您家中的bash_profile)。这仅适用于shell启动文件,而不适用于其他dotfiles。

或者,您可以创建符号链接

ln -s /path/to/rsynced/.bash_profile ~/.bash_profile