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