Remove user and OS dependency for figuring out the profile paths

This commit is contained in:
Bruno Tavares 2014-03-17 15:09:41 -03:00
parent b5d257793f
commit 13a79986ea

View File

@ -19,14 +19,13 @@ kickstart.profile.source_on_configuration_file() {
}
kickstart.profile.location.profile_d() {
kickstart.os.is Ubuntu && echo /etc/profile.d
kickstart.os.is Mac && echo ~/.profile.d
[ -w /etc -o -w /etc/profile.d ] && echo /etc/profile.d || echo ~/.profile.d
}
kickstart.profile.location.zsh() {
[ `whoami` = root ] && echo /etc/zshenv || echo ~/.zshenv
[ -w /etc ] && echo /etc/zshenv || echo ~/.zshenv
}
kickstart.profile.location.bash() {
[ `whoami` = root ] && echo /etc/profile || echo ~/.bashrc
[ -w /etc ] && echo /etc/profile || echo ~/.bashrc
}