]> git.donarmstrong.com Git - bin.git/blobdiff - new_home_directory
add postfix grep
[bin.git] / new_home_directory
index e6883ef135cfefdce788f44049ca44d3f049f2d5..6a5a8593dcec906ae80d5d378c0c7ef1514a1bde 100755 (executable)
@@ -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
-sh -c "$(awk -F "$(echo -ne '\t')" '{print $2}' ~/.home_modules/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 -<<EOF> .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;