yet another tweak to fix pipes
authorChris Koeritz <fred@gruntose.com>
Fri, 10 Nov 2017 01:30:41 +0000 (20:30 -0500)
committerChris Koeritz <fred@gruntose.com>
Fri, 10 Nov 2017 01:30:41 +0000 (20:30 -0500)
had to put the pipe back into the commands, since a variable can't easily inject that.

scripts/rev_control/version_control.sh

index fd300d070b4e04f35c6ba2df06f484d8274a23c4..e7b29b0110ac7a86c512dad134c2fa7c1f44256f 100644 (file)
@@ -15,7 +15,9 @@ export MAX_DEPTH=5
 
 # use our splitter tool for lengthy output if it's available.
 if [ ! -z "$(which splitter)" ]; then
-  TO_SPLITTER="| \"$(which splitter)\""
+  TO_SPLITTER="$(which splitter)"
+else
+  TO_SPLITTER=cat
 fi
 
 ##############
@@ -95,11 +97,11 @@ function do_checkin()
 
       # upload any changes to the upstream repo so others can see them.
       if [ "$myself" != "$parent" ]; then
-        git push origin "$(myself)" 2>&1 | grep -v "X11 forwarding request failed" $TO_SPLITTER
+        git push origin "$(myself)" 2>&1 | grep -v "X11 forwarding request failed" $TO_SPLITTER
         retval+=${PIPESTATUS[0]}
       else
         # this branch is the same as the parent, so just push.
-        git push 2>&1 | grep -v "X11 forwarding request failed" $TO_SPLITTER
+        git push 2>&1 | grep -v "X11 forwarding request failed" $TO_SPLITTER
         retval+=${PIPESTATUS[0]}
       fi
 
@@ -284,10 +286,10 @@ function do_update()
           done
       retval+=${PIPESTATUS[0]}$?
 
-      git fetch --all 2>&1 | grep -v "X11 forwarding request failed" $TO_SPLITTER
+      git fetch --all 2>&1 | grep -v "X11 forwarding request failed" $TO_SPLITTER
       retval+=${PIPESTATUS[0]}
 
-      git pull --all 2>&1 | grep -v "X11 forwarding request failed" $TO_SPLITTER
+      git pull --all 2>&1 | grep -v "X11 forwarding request failed" $TO_SPLITTER
       retval+=${PIPESTATUS[0]}
     fi
   else