Reorganize bash role.

This commit is contained in:
@@@No user configured@@@ 2015-11-18 00:57:38 +01:00
parent 542e894c48
commit fc5f81307c
27 changed files with 67 additions and 65 deletions

9
files/bash_profile Normal file
View file

@ -0,0 +1,9 @@
##
## BASH PROFILE - Only for login shells
##
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi

View file

@ -2,6 +2,12 @@
## BASH RC - every new shell
## 
## 01-29 environment changes (XX-bin-... and XX-env-)
## 40-69 development settings (XX-dev)
## 70-89 utilities and applications specific environment changes (XX-app-...)
## 90-99 shell customisation : colors, prompt, etc.
## 95-99 miscelanous or low priority : aliases and completion (XX-misc-)
if [ -d "$HOME/.bashrc.d" ]; then
for script in $(find "$HOME/.bashrc.d/" -name '*.sh' |sort -n) ; do
# echo "Loading `basename \"$script\"`..." # >&2

View file

@ -5,6 +5,7 @@
#
GNUSIDE_CLOUD_PATH="$HOME/Documents/_GnusideCloud"
if [[ -s "$GNUSIDE_CLOUD_PATH/bin" ]]; then
if [ -d "$GNUSIDE_CLOUD_PATH/bin" ]; then
export PATH="$GNUSIDE_CLOUD_PATH/bin:$PATH"
fi

View file

@ -1,3 +1,4 @@
export PATH
export ANDROID_HOME

View file

@ -0,0 +1,4 @@
# Disable ansible cowsay
export ANSIBLE_NOCOWS=1

View file

@ -0,0 +1,4 @@
# Help darcs on network mounts
export DARCS_SLOPPY_LOCKS=1

View file

@ -0,0 +1,10 @@
#!/bin/sh
# Pager detection
for pager in vim nano emacs ; do
if hash $pager 2> /dev/null ; then
export PAGER=$pager
break
fi
done

View file

@ -0,0 +1,8 @@
if hash gx-search-baloo >/dev/null 2>&1 ; then
function godir() {
dir=$(gx-search-baloo "$@")
cd "$dir"
}
fi

View file

@ -3,3 +3,7 @@
#export GREP_OPTIONS="--color"
#GREP_COLORS="ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36"
#export GREP_COLORS
# disable deprecated variable
export GREP_OPTIONS=

View file

@ -0,0 +1,4 @@
# This line was appended by KDE
# Make sure our customised gtkrc file is loaded.
export GTK2_RC_FILES=$HOME/.gtkrc-2.0

View file

@ -0,0 +1,3 @@
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

View file

@ -0,0 +1,3 @@
# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups

View file

@ -1,4 +1,3 @@
#!/bin/sh
##
# BASH COMPLETION
@ -6,3 +5,4 @@
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi

View file

@ -1,57 +0,0 @@
#source /etc/bash_completion
export EDITOR=vim
# disable deprecated variable
export GREP_OPTIONS=
# load sub-bashrc
## 01-10 environment changes (XX-environment-...)
## 11-20 applications specific environment changes (XX-application-...)
## 81-99 shell customisation (colors, prompt, etc.)
## 91-99 aliases and completion
export SHELL_ISLOGIN=${SHELL_ISLOGIN:-0}
#echo $SHELL_ISLOGIN
# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups
###
# DISPLAY & COLORS
#
export LS_COLORS="$LS_COLORS*.flac=01;35:"
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
#??? shopt -s checkwinsize
# This line was appended by KDE
# Make sure our customised gtkrc file is loaded.
# export GTK2_RC_FILES=$HOME/.gtkrc-2.0
##
# APPLICATION-SPECIFIC SETUP
#
# This line was appended by KDE
# Make sure our customised gtkrc file is loaded.
export GTK2_RC_FILES=$HOME/.gtkrc-2.0
# Help darcs on network mounts
export DARCS_SLOPPY_LOCKS=1
# Disable ansible cowsay
export ANSIBLE_NOCOWS=1
function godir() {
dir=$(gx-search-baloo "$@")
cd "$dir"
}

View file

@ -4,14 +4,16 @@
register: bash_scripts
# tasks file for roles/glenux.bash
- name: Install bashrc
copy: >
src=bashrc
dest=~/.bashrc
- name: Install main configuration files for bash
copy:
src={{item[1]}}
dest=~/.{{item[1]|basename}}
mode=0644
become: true
become_user: "{{item}}"
with_items: bash_users
become_user: "{{item[0]}}"
with_nested:
- bash_users
- ['bashrc', 'bash_profile', 'bash_aliases']
- name: Create bashrc.d directory
file: path=~/.bashrc.d state=directory