2019-11-09 11:54:26 +01:00
2019-11-09 11:54:26 +01:00
2018-10-03 18:48:05 +02:00
2019-02-04 15:31:51 +01:00
2018-10-03 18:48:05 +02:00
2019-02-06 04:26:07 +01:00
2018-10-03 18:48:05 +02:00
2019-11-09 11:54:26 +01:00

#
# put this folder "config" into the $HOME directory
# and run sh README.txt
#
# it will check if .vimrc, .screenrc and .zshrc already
# exists in the $HOME directory and if not it will create
# a sym link in $HOME to those in this config folder
# otherwise if it exist it will add the content of those
# in this config folder to the one already there in $HOME
# 

SCREEN="$HOME/.screenrc"
MYSCREEN="$HOME/config/.screenrc"

VIM="$HOME/.vimrc"
MYVIM="$HOME/config/.vimrc"

ZSH="$HOME/.zshrc"
MYZSH="$HOME/config/.zshrc"


# -------------------------------------------------------------
# action on the .screenrc file
# -------------------------------------------------------------

if [ -f $SCREEN ]; then
	if [ ! -L $SCREEN ]; then
		if grep -q '#hugogogo#' $SCREEN;
		then
			sed '/#hugogogo#/,/#hugogogo#/d' $SCREEN > $SCREEN.tmp
			mv $SCREEN.tmp $SCREEN
		fi
		cat $MYSCREEN >> $SCREEN
	fi
else
	ln -s $MYSCREEN $SCREEN
fi


# -------------------------------------------------------------
# action on the .vimrc file
# -------------------------------------------------------------

if [ -f $VIM ]; then
	if [ ! -L $VIM ]; then
		if grep -q '"hugogogo"' $VIM;
		then
			sed '/"hugogogo"/,/"hugogogo"/d' $VIM > $VIM.tmp
			mv $VIM.tmp $VIM
		fi
		cat $MYVIM >> $VIM
	fi
else
	ln -s $MYVIM $VIM
fi


# -------------------------------------------------------------
# action on the .zshrc file
# -------------------------------------------------------------

if [ -f $ZSH ];
then
	if grep -q '#hugogogo#' $ZSH;
	then
		sed '/#hugogogo#/,/#hugogogo#/d' $ZSH > $ZSH.tmp
		mv $ZSH.tmp $ZSH
	fi
	cat $MYZSH >> $ZSH
else
	echo "you don't have a .zshrc file in your \$HOME directory"
	echo "maybe you should verify if you have zsh :"
	echo "run 'zsh --version'"
	echo "and if not, install it, otherwise create a .zshrc file"
	echo "now run the script README.txt again"
	echo "to set the dynamic title on screen"
fi

Description
No description provided
Readme 160 KiB
Languages
Python 46.6%
Shell 34%
C++ 16.7%
C 2.7%