For discussion of Alpine Linux development and developer support

[alpine-devel] [PATCH] abuild: another trivial update to the saveas-* support

Matt Smith
Details
Message ID
<1294445625-15497-1-git-send-email-mcs@darkregion.net>
Sender timestamp
1294445625
DKIM signature
missing
Download raw message
Patch: +4 -3
I opted for ncopa's method to fix saveas-* URIs, obtained from his sourcecheck()
function, also in abuild.
---
 abuild.in |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/abuild.in b/abuild.in
index 904b1c3..528fba5 100755
--- a/abuild.in
+++ b/abuild.in
@@ -195,9 +195,10 @@ uri_fetch() {
 
 	# fix saveas-*://* URIs
 	case "$uri" in
-		# remove 'saveas-' from beginning and
-		# '/filename' from end of URI
-		saveas-*://*) uri="${uri:7:$(expr ${#uri} - 7 - ${#d} - 1)}";;
+		saveas-*://*)
+			uri=${uri#saveas-}   # remove 'saveas-' from beginning
+			uri=${uri%/*}        # remove '/<filename>' from end
+			;;
 	esac
 
 	# we need GNU wget for this
-- 
1.7.3.3



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---