diff options
author | Mark Ferrell <major@homeonderanged.org> | 2014-05-09 08:37:43 -0700 |
---|---|---|
committer | Mark Ferrell <major@homeonderanged.org> | 2014-05-09 08:37:43 -0700 |
commit | 85895485f988360aae9d5fb24f1973a76a062f23 (patch) | |
tree | 597e051097ab7a2644524918fa7f330c6fbb1874 | |
parent | eca85018da244917cb7b47a57a4faf986f168326 (diff) |
Remove leading directories from fetched URL's
* Whel fetching from Perforce we now strip the leading directories of the URL
from the fetched files.
-rwxr-xr-x | libexec/build-fetch-p4 | 8 |
1 files 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}" |