health
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Health] bash_profile


From: David Bruchmann
Subject: Re: [Health] bash_profile
Date: Wed, 23 Apr 2014 14:31:58 +0700

Hi Chris,

Thanks for the information.

You can tell me which options exist to configure or access Tryton / Health by Bash?
I think we speak always about the server then ...

Best Regards,
David


On Wed, Apr 23, 2014 at 2:17 PM, Chris <address@hidden> wrote:
Hiya!

> I'd like to know whats in the bash_profile.

Sorry if this is completely misleading, but I quickly looked through the
gnuhealth_install.sh script for relevant bash_profile stuff. Here is the
function that seems relevant:

bash_profile () {

    ...blah...

    # Load .gnuhealthrc from .bash_profile . If .bash_profile does not exist, create it.
    if [ -e $HOME/.bash_profile ] ; then
        grep --silent "source ${PROFILE}" $HOME/.bash_profile || echo "[[ -f ${PROFILE} ]] && source ${PROFILE}" >> $HOME/.bash_profile
    else
        echo "[[ -f ${PROFILE} ]] && source ${PROFILE}" >> $HOME/.bash_profile
    fi

}

So... it checks whether bash_profile is sourcing PROFILE
(= $HOME/.gnuhealthrc)... if not, it modifies it to source it.

Here is the gnuhealthrc file:

export EDITOR=vi

if ! type $EDITOR >/dev/null ; then
    echo "$EDITOR not found"
fi


# Aliases
alias cdlogs='cd $HOME/gnuhealth/logs'
alias cdexe='cd $HOME/gnuhealth/tryton/server/trytond-*/bin'
alias cdconf='cd $HOME/gnuhealth/tryton/server/trytond-*/etc'
alias cdmods='cd $HOME/gnuhealth/tryton/server/modules'
alias editconf='${EDITOR} $HOME/gnuhealth/tryton/server/trytond-*/etc/trytond.conf'

alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'

alias ls='ls --color=auto'

#Prompt

PS1="\[\e[32;address@hidden:\[\e[30;0m\]\w $ \[\e[0m\]"

So... aliases, editor, and prompt. Not that important. Unless I'm
missing something, hehe.

-C



reply via email to

[Prev in Thread] Current Thread [Next in Thread]