u
This commit is contained in:
parent
1034cfa0fa
commit
a7e073853c
@ -8,7 +8,7 @@ else
|
|||||||
echo "Usage: setup.sh [Config-Source-Path] [User-Home-Path] [--AdotMode]"
|
echo "Usage: setup.sh [Config-Source-Path] [User-Home-Path] [--AdotMode]"
|
||||||
echo
|
echo
|
||||||
echo "=== Enter config source path (leave blank for [/Users/luk.lu]/faronear/fon/sysconfig/nixhome):"
|
echo "=== Enter config source path (leave blank for [/Users/luk.lu]/faronear/fon/sysconfig/nixhome):"
|
||||||
read -p ">> " SourcePath
|
read -p ">>> " SourcePath
|
||||||
if [ ! $SourcePath ]
|
if [ ! $SourcePath ]
|
||||||
then
|
then
|
||||||
echo "Use default source path: [Users/luk.lu]/faronear/fon/sysconfig/nixhome"
|
echo "Use default source path: [Users/luk.lu]/faronear/fon/sysconfig/nixhome"
|
||||||
@ -40,7 +40,7 @@ then
|
|||||||
homescriptlist=".emacs .emacs.lisp .bashrc .bash_profile .gitignore"
|
homescriptlist=".emacs .emacs.lisp .bashrc .bash_profile .gitignore"
|
||||||
echo
|
echo
|
||||||
echo "=== Copy or link scripts? l for link, anything else for copy:"
|
echo "=== Copy or link scripts? l for link, anything else for copy:"
|
||||||
read -p ">> " CopyOrLinkScripts
|
read -p ">>> " CopyOrLinkScripts
|
||||||
for homescript in $homescriptlist
|
for homescript in $homescriptlist
|
||||||
do
|
do
|
||||||
rm -fr $homescript.backup
|
rm -fr $homescript.backup
|
||||||
@ -56,7 +56,7 @@ then
|
|||||||
done
|
done
|
||||||
echo
|
echo
|
||||||
echo "=== Append or link or omit [.ssh/authorized_keys]? a for append, l for link, anything else for omit:"
|
echo "=== Append or link or omit [.ssh/authorized_keys]? a for append, l for link, anything else for omit:"
|
||||||
read -p ">> " CopyOrLinkOrOmitAuthorizedKeys
|
read -p ">>> " CopyOrLinkOrOmitAuthorizedKeys
|
||||||
if [ $CopyOrLinkOrOmitAuthorizedKeys = 'l' ]
|
if [ $CopyOrLinkOrOmitAuthorizedKeys = 'l' ]
|
||||||
then
|
then
|
||||||
echo "--- Linking $SourcePath/authorized_keys to $HomePath/.ssh/authorized_keys ..."
|
echo "--- Linking $SourcePath/authorized_keys to $HomePath/.ssh/authorized_keys ..."
|
||||||
@ -72,6 +72,7 @@ then
|
|||||||
cat $SourcePath/.ssh/authorized_keys >> $HomePath/.ssh/authorized_keys
|
cat $SourcePath/.ssh/authorized_keys >> $HomePath/.ssh/authorized_keys
|
||||||
chmod 600 $HomePath/.ssh/authorized_keys
|
chmod 600 $HomePath/.ssh/authorized_keys
|
||||||
fi
|
fi
|
||||||
|
echo
|
||||||
popd
|
popd
|
||||||
else
|
else
|
||||||
echo "!!! Not existing $SourcePath or $HomePath, please try again."
|
echo "!!! Not existing $SourcePath or $HomePath, please try again."
|
||||||
|
Loading…
Reference in New Issue
Block a user