From d790719d5ddae9e15cff8ae89eab5df84c701fc4 Mon Sep 17 00:00:00 2001 From: Jessica Hamilton Date: Wed, 10 Jun 2015 21:49:45 +1200 Subject: [PATCH] bash: also migrate ~/.profile to ~/config/settings --- app-shells/bash/bash-4.3.39.recipe | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/app-shells/bash/bash-4.3.39.recipe b/app-shells/bash/bash-4.3.39.recipe index c1fc6ff71..d0cdd7a8d 100644 --- a/app-shells/bash/bash-4.3.39.recipe +++ b/app-shells/bash/bash-4.3.39.recipe @@ -82,6 +82,7 @@ BUILD_PREREQUIRES=" cmd:awk cmd:patch cmd:autoconf + cmd:sed " PATCH() @@ -108,14 +109,14 @@ INSTALL() mkdir -p $prefix/boot/post-install cat <<'EOF' > $prefix/boot/post-install/move-bash-files.sh #!/bin/sh -for f in ~/.bash* ; do - name=`basename $f | sed -e 's/^\.//'` - if [ ! -e ~/config/settings/$name ]; then - echo "Moving $f to ~/config/settings/$name..." - mv $f ~/config/settings/$name - else - echo "Removing $f, as already exists at ~/config/settings/$name..." - rm $f +for f in ~/.bash* ~/.profile ; do + if [ -f $f ] ; then + name=`basename $f | sed -e 's/^\.//'` + if [ ! -e ~/config/settings/$name ]; then + mv $f ~/config/settings/$name + else + rm $f + fi fi done EOF