]> git.donarmstrong.com Git - bin.git/blob - new_home_directory
fix new_home directory, and add more cases to sanitize_filename
[bin.git] / new_home_directory
1 #!/bin/sh
2
3 # makes a new home directory; defaults to one that does not use ssh
4 SVN_BASE=http://svn.donarmstrong.com/don/trunk
5
6 # check out bin and lib
7 cd ~;
8 svn co $SVN_BASE/bin
9 svn co $SVN_BASE/lib
10
11 # check out the .home modules
12 mkdir .home_modules;
13 (
14     cd .home_modules;
15     svn co $SVN_BASE/home_modules/base;
16     for module in $@; do
17         svn co $SVN_BASE/home_modules/$module;
18     done;
19 )
20 # make a home backup directory
21 mkdir home_backup;
22 mv .wgetrc .svn .sversionrc home_backup/;
23 # run the appropriate command to set the symlinks correctly
24 sh -c "$(awk -F '       ' '{print $2}' ~/.home_modules/base/sa_base) ~/.home_modules;"
25 mkdir .sa.d;
26 ln -s ~/.home_modules/*/sa_* .sa.d/;
27 cat -<<EOF> .sa.d/sa_local
28 ~/bin
29 ~/lib
30 EOF
31 exec sa update;