From 95436c732e184900f7ab2a88e8709a69b0914bd1 Mon Sep 17 00:00:00 2001
From: Chuck Atkins <chuck.atkins@kitware.com>
Date: Fri, 7 Apr 2017 07:48:10 -0500
Subject: [PATCH] Fix setup scripts to work with older git versions

---
 scripts/developer/git/setup-aliases | 4 ++--
 scripts/developer/git/setup-remotes | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/developer/git/setup-aliases b/scripts/developer/git/setup-aliases
index 2d996582b..b0f19ae7b 100755
--- a/scripts/developer/git/setup-aliases
+++ b/scripts/developer/git/setup-aliases
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 echo "Setting up git aliases..."
-if ! which clang-format 2>1 1>/dev/null
+if ! which clang-format 1>/dev/null 2>&1
 then
   echo "Warning: ADIOS uses clang-format to enforce style guidelines but no"
   echo "         clang-format binary was found in tyour path"
@@ -9,7 +9,7 @@ fi
 
 if ! git config alias.clang-format "!scripts/developer/git/git-clang-format"
 then
-  echo "Error adding clang-format alias"
+  echo "Waring: Error adding clang-format alias"
 fi
 
 exit 0
diff --git a/scripts/developer/git/setup-remotes b/scripts/developer/git/setup-remotes
index 17cac1b31..7756f72b6 100755
--- a/scripts/developer/git/setup-remotes
+++ b/scripts/developer/git/setup-remotes
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 echo "Checking GitHub username..."
-GHUSER=$(git remote get-url origin | sed 's|.*[:/]\([^/]*\)/adios2.git|\1|')
+GHUSER=$(git remote show origin | grep "Fetch URL" | sed 's|.*[:/]\([^/]*\)/adios2.git|\1|')
 if [ -z "${GHUSER}" ]
 then
   echo "  Warning: Unable to determine GitHub username.  Are you sure you"
-- 
GitLab