-
Notifications
You must be signed in to change notification settings - Fork 0
/
environment-setup.sh
84 lines (69 loc) · 2.1 KB
/
environment-setup.sh
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
# My Environment Setup
#
# This file should be included from .bashrc and these environment variables
# should be defined:
# MY_USER_HOME -- path to main user home directory
# MY_SCRIPTS_PATH -- path to scripts directory where this file is located
#
# Example .bashrc:
# MY_USER_HOME="/home/pbrezina"
# MY_SCRIPTS_PATH="$MY_USER_HOME/workspace/scripts"
# MY_BASHRC="$MY_SCRIPTS_PATH/environment-setup.sh"
#
# if [ ! -f $MY_BASHRC ]; then
# echo "Missing file: $MY_BASHRC"
# return 1
# fi
#
# . $MY_BASHRC
#
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Source git bash-completion
if [ -f /usr/share/git-core/contrib/completion/git-prompt.sh ]; then
. /usr/share/git-core/contrib/completion/git-prompt.sh
GIT_PS1_SHOWDIRTYSTATE="yes"
GIT_PS1_SHOWUNTRACKEDFILES="yes"
MY_GIT_PROMPT='$(__git_ps1 " (%s)")'
fi
# Source FZF
if [ -f /usr/share/fzf/shell/key-bindings.bash ]; then
. /usr/share/fzf/shell/key-bindings.bash
fi
export GPG_TTY=$(tty)
export EDITOR=vim
export MY_PS1_SIGN="\$"
if [[ $EUID -eq 0 ]]; then
export MY_PS1_SIGN="#"
fi
host=""
if [ ! -z $CONTAINER ]; then
host="\e[1;34m\H\e[0m "
fi
export PS1="$host[\u \w$MY_GIT_PROMPT]$MY_PS1_SIGN "
export MY_WORKSPACE="$MY_USER_HOME/workspace"
export MY_INCLUDE="$MY_SCRIPTS_PATH/include $MY_WORKSPACE/sssd-dev-utils"
#export PS1="\[$(tput bold)\]\[\033[38;5;154m\]\W $\[$(tput sgr0)\] "
# Setup SSSD Developer Tools
export SSSD_SOURCE=$MY_WORKSPACE/sssd
export SSSD_BUILD=/dev/shm/sssd
export SSSD_TEST_DIR=/dev/shm/sssd-tests
export SSSD_USER=root
export SSSD_RHEL_PACKAGE=$MY_USER_HOME/packages/rhel/sssd
export CFLAGS_CUSTOM=""
export GIT_PATCH_LOCATION="$MY_USER_HOME/Downloads"
export GIT_DEVEL_REPOSITORY="devel"
export GIT_PUSH_REPOSITORIES="pbrezina"
export NTP_SERVER="master.ipa.vm"
# PHP Development
export XDEBUG_CONFIG="idekey=VSCODE"
alias my="$MY_SCRIPTS_PATH/my"
. $MY_SCRIPTS_PATH/vagrant-setup.sh
. $MY_SCRIPTS_PATH/include-scripts.sh
# Source local environment
if [ -f $MY_SCRIPTS_PATH/local-environment.sh ]; then
. $MY_SCRIPTS_PATH/local-environment.sh
fi