]> git.donarmstrong.com Git - bin.git/commitdiff
* update new_home_directory and make sa not run svn if it's just supposed to run...
authorDon Armstrong <don@donarmstrong.com>
Wed, 28 Jun 2006 04:30:21 +0000 (04:30 +0000)
committerDon Armstrong <don@donarmstrong.com>
Wed, 28 Jun 2006 04:30:21 +0000 (04:30 +0000)
new_home_directory
sa

index 2233e3c6be03371c18aa3c56ecb1df16fec6d32e..90ceb187e1a7f6a72efef75c448b51acfa91a15f 100755 (executable)
@@ -19,9 +19,9 @@ mkdir .home_modules;
 )
 # make a home backup directory
 mkdir home_backup;
-mv .wgetrc home_backup/;
-mv .svn home_backup/;
-mv .sversionrc home_backup/;
+for a in .wgetrc .svn .sversionrc .subversion .bash_profile .bashrc .ssh; do
+    mv $a home_backup/;
+done;
 mkdir .sa.d;
 ln -s ~/.home_modules/*/sa_* .sa.d/;
 # run the appropriate command to set the symlinks correctly
@@ -30,4 +30,8 @@ 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;
 exec ~/bin/sa update;
\ No newline at end of file
diff --git a/sa b/sa
index 0baa72881aeb5043f48728e61121d0ad047b7aa4..acf37dff3827ffc7d70ba98c366fa8920d2e39c0 100755 (executable)
--- a/sa
+++ b/sa
@@ -97,9 +97,11 @@ my $HOME=$ENV{HOME};
 my $HOSTNAME=qx(hostname);
 $HOSTNAME=~s/\n//g;
 my $CAN_IGNORE_EXTERNALS = 0;
-qx(svn --version) =~ /\(r(\d+)\)/;
-if ($1 > 13838) {
-     $CAN_IGNORE_EXTERNALS = 1;
+if (not $options{hooks_only}) {
+     qx(svn --version) =~ /\(r(\d+)\)/;
+     if ($1 > 13838) {
+         $CAN_IGNORE_EXTERNALS = 1;
+     }
 }
 
 sub available_config_files{