u
This commit is contained in:
@@ -33,15 +33,28 @@ fi
|
||||
|
||||
if [ -d $SourcePath ] && [ -d $HomePath ]
|
||||
then
|
||||
echo "--- Linking $SourcePath/* to $HomePath/* ..."
|
||||
pushd $HomePath
|
||||
homescriptlist=".emacs .emacs.lisp .bashrc .bash_profile .gitignore"
|
||||
for homescript in $homescriptlist
|
||||
do
|
||||
echo "--- Copying $SourcePath/$homescript to $HomePath/$homescript ..."
|
||||
rm -fr $homescript.backup
|
||||
mv $homescript $homescript.backup
|
||||
cp -r $SourcePath/$homescript $HomePath
|
||||
done
|
||||
read -p "Linking .ssh/authorized_keys? Enter l to link or anything else to ignore >> " linkSshKeys
|
||||
if [ $linkSshKeys == "l" ]
|
||||
then
|
||||
echo "--- Linking $SourcePath/authorized_keys to $HomePath/.ssh/authorized_keys ..."
|
||||
mkdir -p $HomePath/.ssh
|
||||
chmod 700 $HomePath/.ssh
|
||||
if [ -e $HomePath/.ssh/authorized_keys ]
|
||||
then
|
||||
rm -fr $HomePath/.ssh/authorized_keys.backup
|
||||
mv $HomePath/.ssh/authorized_keys $HomePath/.ssh/authorized_keys.backup
|
||||
fi
|
||||
ln -s $SourcePath/.ssh/authorized_keys $HomePath/.ssh/authorized_keys
|
||||
fi
|
||||
popd
|
||||
else
|
||||
echo "!!! Not existing $SourcePath or $HomePath, please try again."
|
||||
|
||||
Reference in New Issue
Block a user