From abe53a8d7ef00fb29940b9763c165274f40bbe06 Mon Sep 17 00:00:00 2001 From: ardentsword Date: Sun, 8 Nov 2015 17:18:29 +0100 Subject: [PATCH 1/2] reset .profile to original state, default force color to yes --- bash/.bashrc | 4 ++-- profile/.profile | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/bash/.bashrc b/bash/.bashrc index 7f2c616..37acc9a 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -48,7 +48,7 @@ esac # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt -#force_color_prompt=yes +force_color_prompt=yes if [ -n "$force_color_prompt" ]; then if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then @@ -92,7 +92,7 @@ if [ "$color_prompt" = yes ]; then # git in bash PROMPT_COMMAND='__git_ps1_new "'$PS1FRONT'" "'$PS1BACK'";' else - PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' + PS1="$RS${debian_chroot:+($debian_chroot)}\u@\h:\w\$ " PS2="> " fi unset color_prompt force_color_prompt diff --git a/profile/.profile b/profile/.profile index 3871890..93bbc73 100644 --- a/profile/.profile +++ b/profile/.profile @@ -8,9 +8,6 @@ # for ssh logins, install and configure the libpam-umask package. #umask 022 -# set TERM to xterm-color to allow colors in the terminal -TERM=xterm-color - # if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists From 8529e65ab136de589176dbe5631565ce1f945e5e Mon Sep 17 00:00:00 2001 From: ardentsword Date: Sun, 8 Nov 2015 17:43:15 +0100 Subject: [PATCH 2/2] added automic stow conflict resolver --- remove-stow-conflicts.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 remove-stow-conflicts.sh diff --git a/remove-stow-conflicts.sh b/remove-stow-conflicts.sh new file mode 100755 index 0000000..575a01a --- /dev/null +++ b/remove-stow-conflicts.sh @@ -0,0 +1,26 @@ +#! /bin/sh + +# remove-stow-conflicts -- +# remove all conflicts detected by stow, but that are +# already links to previous stow packages... + +# $Id: remove-stow-conflicts,v 1.1 1997/10/17 21:19:03 cdua Exp cdua $ +# Carlos Duarte, 970903/971017 + +stow -nvc $* 2>&1 \ + | sed -n '/^CONFLICT/s/^.*vs\. //p' \ + | while read i; do + test -L $i || { + echo Skipping $i ... + continue + } + + point_to=`ls -ald $i | awk '{print $NF}'` + + #echo $i points to $point_to + case $point_to in + ..*/stow/* | ..*/?stow/* | stow/* ) + echo "Deleting $i (link to $point_to)"... + rm -f $i + esac +done