# shellcheck disable=SC2148 disable=SC2034
#==============================================================================
# Copyright and license info is available in the LICENSE file included with
# the Server Deployment Package (SDP), and also available online:
# https://swarm.workshop.perforce.com/projects/perforce-software-sdp/view/main/LICENSE
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Version ID Block. Relies on +k filetype modifier.
# VersionID='$Id: //p4-sdp/dev_c2s/Server/Unix/p4/common/lib/libp4u.sh#2 $ $Change: 31472 $'
#==============================================================================
# Library Functions.
#------------------------------------------------------------------------------
# Function: getLocalPath
#
# Input:
# $1 - p4Path in depot or client syntax, e.g. "//depot/main/foo.c"
#
# Usage Example: localPath=$(getLocalPath "//depot/main/foo.c")
#------------------------------------------------------------------------------
function getLocalPath {
local p4Path=$1
local localPath
[[ -n "$p4Path" ]] || return
localPath=$(p4 -ztag where "$p4Path"|grep "^\.\.\. path"|tail -1)
localPath=${localPath#... path }
localPath=${localPath%\/\.\.\.}
echo -n "$localPath"
}
| # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #2 | 31472 | C. Thomas Tyler |
Updated bash scripts and bash template to new file versioning scheme. Modernized template bash script. |
||
| #1 | 31399 | C. Thomas Tyler | Populate -r -S //p4-sdp/dev_c2s. | ||
| //p4-sdp/dev/Server/Unix/p4/common/lib/libp4u.sh | |||||
| #1 | 31397 | C. Thomas Tyler | Populate -b SDP_Classic_to_Streams -s //guest/perforce_software/sdp/...@31368. | ||
| //guest/perforce_software/sdp/dev/Server/Unix/p4/common/lib/libp4u.sh | |||||
| #4 | 26395 | C. Thomas Tyler | Shellcheck compliance changes. | ||
| #3 | 16029 | C. Thomas Tyler |
Routine merge to dev from main using: p4 merge -b perforce_software-sdp-dev |
||
| #2 | 13582 | C. Thomas Tyler |
Updated template.sh and associated bash libraries. Added show_versions() standard function and a standard '-V' flag to access it. Added version value definitions to all bash library files. |
||
| #1 | 10638 | C. Thomas Tyler | Populate perforce_software-sdp-dev. | ||
| //guest/perforce_software/sdp/main/Server/Unix/p4/common/lib/libp4u.sh | |||||
| #1 | 10148 | C. Thomas Tyler | Promoted the Perforce Server Deployment Package to The Workshop. | ||