mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
bash: also migrate ~/.profile to ~/config/settings
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user