bash: also migrate ~/.profile to ~/config/settings

This commit is contained in:
Jessica Hamilton
2015-06-10 21:49:45 +12:00
parent 3c224a6eee
commit d790719d5d

View File

@@ -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