1dd7eef
From 326a73aaf02fc462374a38d4a20f04f80c89ffb4 Mon Sep 17 00:00:00 2001
1dd7eef
From: Dennis Gilmore <dennis@ausil.us>
1dd7eef
Date: Sun, 11 Dec 2016 13:00:11 -0600
e1f9159
Subject: [PATCH 2/4] remove the () in two steps
1dd7eef
1dd7eef
bash in rhel6 does not support the :1:-1 format for stripping off ()
1dd7eef
so do it in two steps and explicitly stip off the characters
1dd7eef
1dd7eef
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
1dd7eef
---
1dd7eef
 bin/fedpkg | 3 ++-
1dd7eef
 1 file changed, 2 insertions(+), 1 deletion(-)
1dd7eef
1dd7eef
diff --git a/bin/fedpkg b/bin/fedpkg
1dd7eef
index be16b27..b0cefea 100755
1dd7eef
--- a/bin/fedpkg
1dd7eef
+++ b/bin/fedpkg
1dd7eef
@@ -32,7 +32,8 @@ if [[ -s sources ]]; then
1dd7eef
         # the same type, so we don't need to read it again for each line.
1dd7eef
         while read -r _ filename _ hash; do
1dd7eef
             # Remove parenthesis around tarball name
1dd7eef
-            tarball=${filename:1:-1}
1dd7eef
+	    filename=${filename#(}
1dd7eef
+	    tarball=${filename%)}
1dd7eef
             curl -H Pragma: -o "./$tarball" -R -S --fail "$baseurl/$pkgname/$tarball/$hashtype/$hash/$tarball"
1dd7eef
         done < sources
1dd7eef
         "${hashtype}sum" -c sources
1dd7eef
-- 
1dd7eef
2.11.0
1dd7eef