Add doc function
This commit is contained in:
@ -2,7 +2,7 @@ kickstart.profile.add_to_profile() {
|
||||
local file=$1
|
||||
[ ! -f files/$file ] && kickstart.info "File files/$file not found" && exit 1
|
||||
|
||||
local profile_d=`kickstart.profile.profile.d.location`
|
||||
local profile_d=`kickstart.profile.location.profile_d`
|
||||
mkdir -p $profile_d
|
||||
|
||||
cp files/$file $profile_d/$file
|
||||
@ -11,11 +11,6 @@ kickstart.profile.add_to_profile() {
|
||||
kickstart.os.is Mac && kickstart.profile.source_on_configuration_file $file $profile_d `kickstart.profile.location.bash`
|
||||
}
|
||||
|
||||
kickstart.profile.profile.d.location() {
|
||||
kickstart.os.is Ubuntu && echo /etc/profile.d
|
||||
kickstart.os.is Mac && echo ~/.profile.d
|
||||
}
|
||||
|
||||
kickstart.profile.source_on_configuration_file() {
|
||||
local file=$1
|
||||
local profile_d=$2
|
||||
@ -23,6 +18,11 @@ kickstart.profile.source_on_configuration_file() {
|
||||
grep -q $file $configuration 2>/dev/null || ( echo "[[ -f $profile_d/$file ]] && source $profile_d/$file" >> $configuration )
|
||||
}
|
||||
|
||||
kickstart.profile.location.profile_d() {
|
||||
kickstart.os.is Ubuntu && echo /etc/profile.d
|
||||
kickstart.os.is Mac && echo ~/.profile.d
|
||||
}
|
||||
|
||||
kickstart.profile.location.zsh() {
|
||||
[ `whoami` = root ] && echo /etc/zshenv || echo ~/.zshenv
|
||||
}
|
||||
|
Reference in New Issue
Block a user