fixup commit scripts for git
authorIvan Kohler <ivan@freeside.biz>
Mon, 20 Feb 2012 08:34:50 +0000 (00:34 -0800)
committerIvan Kohler <ivan@freeside.biz>
Mon, 20 Feb 2012 08:34:50 +0000 (00:34 -0800)
bin/231add
bin/231commit
bin/23add
bin/23commit

index ee9f8a4..c4b5437 100755 (executable)
@@ -9,15 +9,14 @@ my $dir = getcwd;
 ( my $prefix = $dir ) =~ s(^/home/$USER/freeside/?)() or die $dir; #eventually from anywhere
 
 system join('',
-  #"cvs add @ARGV && ",
-  "cvs add @ARGV ; ",
+  "git add @ARGV ; ",
   "( for file in @ARGV; do ",
      "cp -i \$file /home/$USER/freeside2.3/$prefix/`dirname \$file`;",
      "cp -i \$file /home/$USER/freeside2.1/$prefix/`dirname \$file`;",
   "done ) && ",
   "cd /home/$USER/freeside2.3/$prefix/ && ",
-  "cvs add @ARGV",
+  "git add @ARGV; ",
   "cd /home/$USER/freeside2.1/$prefix/ && ",
-  "cvs add @ARGV"
+  "git add @ARGV"
 );
 
index e047005..fa031b5 100755 (executable)
@@ -18,12 +18,12 @@ die "no files!" unless @ARGV;
 
 #print <<END;
 system join('',
-  "( cd /home/$USER/freeside2.3/$prefix; cvs update @ARGV ) && ",
-  "( cd /home/$USER/freeside2.1/$prefix; cvs update @ARGV ) && ",
-  "cvs diff -u @ARGV | ( cd /home/$USER/freeside2.3/$prefix; patch -p0 ) ",
-  " && cvs diff -u @ARGV | ( cd /home/$USER/freeside2.1/$prefix; patch -p0 ) ",
-  " && ( ( cvs commit  -m $desc @ARGV & ); ",
-  "( sleep 1;cd /home/$USER/freeside2.3/$prefix; cvs commit -m $desc @ARGV & ); ",
-  "( sleep 1;cd /home/$USER/freeside2.1/$prefix; cvs commit -m $desc @ARGV & ) )"
+  "( cd /home/$USER/freeside2.3/$prefix; git pull ) && ",
+  "( cd /home/$USER/freeside2.1/$prefix; git pull ) && ",
+  "git diff -u @ARGV | ( cd /home/$USER/freeside2.3/$prefix; patch -p0 ) ",
+  " && git diff -u @ARGV | ( cd /home/$USER/freeside2.1/$prefix; patch -p0 ) ",
+  " && ( ( git commit  -m $desc @ARGV && git push); ",
+  "( cd /home/$USER/freeside2.3/$prefix; git commit -m $desc @ARGV && git push); ",
+  "( cd /home/$USER/freeside2.1/$prefix; git commit -m $desc @ARGV && git push) )"
 );
 
index 3c99ed8..7dc9f13 100755 (executable)
--- a/bin/23add
+++ b/bin/23add
@@ -9,12 +9,11 @@ my $dir = getcwd;
 ( my $prefix = $dir ) =~ s(^/home/$USER/freeside/?)() or die $dir; #eventually from anywhere
 
 system join('',
-  #"cvs add @ARGV && ",
-  "cvs add @ARGV ; ",
+  "git add @ARGV ; ",
   "( for file in @ARGV; do ",
      "cp -i \$file /home/$USER/freeside2.3/$prefix/`dirname \$file`;",
   "done ) && ",
   "cd /home/$USER/freeside2.3/$prefix/ && ",
-  "cvs add @ARGV"
+  "git add @ARGV"
 );
 
index e629a60..3416925 100755 (executable)
@@ -18,9 +18,9 @@ die "no files!" unless @ARGV;
 
 #print <<END;
 system join('',
-  "( cd /home/$USER/freeside2.3/$prefix; cvs update @ARGV ) && ",
-  "cvs diff -u @ARGV | ( cd /home/$USER/freeside2.3/$prefix; patch -p0 ) ",
-  " && ( ( cvs commit  -m $desc @ARGV & ); ",
-  "( sleep 1;cd /home/$USER/freeside2.3/$prefix; cvs commit -m $desc @ARGV & ) )"
+  "( cd /home/$USER/freeside2.3/$prefix; git pull ) && ",
+  "git diff -u @ARGV | ( cd /home/$USER/freeside2.3/$prefix; patch -p0 ) ",
+  " && ( ( git commit  -m $desc @ARGV && git push ); ",
+  "( cd /home/$USER/freeside2.3/$prefix; git commit -m $desc @ARGV && git push ) )"
 );