X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=new_home_directory;h=6a5a8593dcec906ae80d5d378c0c7ef1514a1bde;hb=089c1541f6e4b8ae8d9e856bad88df836c590d2a;hp=02a717b70294146e4e6f3a8de2ca9f38bca54986;hpb=29d08b9b2e2e34c97671155b2ce8cdb14646766d;p=bin.git diff --git a/new_home_directory b/new_home_directory index 02a717b..6a5a859 100755 --- a/new_home_directory +++ b/new_home_directory @@ -19,9 +19,25 @@ mkdir .home_modules; ) # make a home backup directory mkdir home_backup; -mv .wgetrc .svn .sversionrc home_backup/; -# run the appropriate command to set the symlinks correctly -$(awk -F "$(echo -ne '\t')" '{print $2}' base/sa_base) ~/.home_modules; +for a in .wgetrc .svn .sversionrc .subversion .bash_profile .bash_logout .bashrc .ssh; do + if [ -e $a ]; then + mv $a home_backup/; + fi; +done; mkdir .sa.d; ln -s ~/.home_modules/*/sa_* .sa.d/; -exec sa update; \ No newline at end of file +# run the appropriate command to set the symlinks correctly +~/bin/sa --hooks-only update +cat -< .sa.d/sa_local +~/bin +~/lib +EOF +# move back the .ssh stuff +if [ -e home_backup/.ssh ]; then + cp -f home_backup/.ssh/* .ssh/; +fi; +~/bin/sa update; +# if there isn't already a .ssh/authorized_keys, symlink authorized_keys_default to it +if [ ! -e .ssh/authorized_keys ]; then + (cd .ssh/; ln authorized_keys_default authorized_keys -s;) +fi;