blob: 715a436fb89e2d0cc411a53c3898650be4613187 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/bin/bash
AUTO_DIR='/opt/auto/07p'
export AUTO_DIR
PATH="${AUTO_DIR}/cmds:${AUTO_DIR}/bin:${PATH}"
export PATH
USER_RCFILE=~/".auto/auto.bashrc"
if [ -e "${USER_RCFILE}" ]; then
rcfile_opt="--rcfile ${USER_RCFILE}"
else
rcfile_opt="--norc"
### In case there is no user specified rc-file, set a reasonable prompt indicating that we have AUTO-environemnt variables loaded. ###
if [ -n "${PS1}" ]; then
PS1_GENERAL="${PS1}"
else
PS1_GENERAL='[\u@\h] [\w] '
fi
PS1_AUTO_PREFIX=''
PS1_AUTO_SUFFIX='[AUTO-07P SESSION]\$ '
PS1="${PS1_AUTO_PREFIX}${PS1_GENERAL}${PS1_AUTO_SUFFIX}"
export PS1
fi
if [ "$#" -gt "0" ]; then # If there are command line arguments given, we want to execute them.
run_mode_opt="-i -c"
else
run_mode_opt="-i"
fi
bash --noprofile ${rcfile_opt} ${run_mode_opt} "$@"
|