From 85895485f988360aae9d5fb24f1973a76a062f23 Mon Sep 17 00:00:00 2001 From: Mark Ferrell Date: Fri, 9 May 2014 08:37:43 -0700 Subject: Remove leading directories from fetched URL's * Whel fetching from Perforce we now strip the leading directories of the URL from the fetched files. --- libexec/build-fetch-p4 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libexec/build-fetch-p4 b/libexec/build-fetch-p4 index b0af079..0b7c45c 100755 --- a/libexec/build-fetch-p4 +++ b/libexec/build-fetch-p4 @@ -12,11 +12,8 @@ build_fetch_p4() build_fetch_p4_var= build_fetch_p4_change= - # FIXME ignore the server if specified? The core problem here is that - # p4 seems to have no way to specify what server you pull from. It - # generally assumes that the p4 client only has a single local server. - # So specifying any such server (usually named 'perforce') is - # fundementally a waste. + # FIXME ignore the server if specified? Technically we can set P4PORT + # to the server:port combination to force a server name. if test "${build_fetch_p4_uri#/}" = "${build_fetch_p4_uri}"; then build_fetch_p4_uri="/${build_fetch_p4_uri#*/}" fi @@ -67,6 +64,7 @@ build_fetch_p4() if test "${build_fetch_p4_remote}" != "//${build_fetch_p4_local}"; then die "parsing '${build_fetch_p4_line}'" fi + build_fetch_p4_local="./${build_fetch_p4_local#${build_fetch_p4_uri#/}}" # Append the @change number, if any build_fetch_p4_remote="${build_fetch_p4_remote}${build_fetch_p4_change}" -- cgit v1.2.3-18-g5258