File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 1- #! /bin/bash
2- if [ -e $1 /$2 /.r10k-deploy.json ]
1+ RONMENTPATH=$1
2+ # $ENVIRONMENTPATH may contain multiple colon-delimited locations.
3+ # We need to pick the first one that contains $ENVIRONMENT.
4+ IFS=" :"
5+ for CANDIDATEPATH in ${ENVIRONMENTPATH} ; do
6+ if [ -d " ${CANDIDATEPATH} /${2} " ]; then
7+ ENVIRONMENTPATH=$CANDIDATEPATH
8+ break
9+ fi
10+ done
11+
12+ if [ -e " ${ENVIRONMENTPATH} /$2 /.r10k-deploy.json" ]
313then
4- /opt/puppetlabs/puppet/bin/ruby $1 /$2 /scripts/code_manager_config_version.rb $1 $2
14+ /opt/puppetlabs/puppet/bin/ruby " ${ENVIRONMENTPATH} /$2 /scripts/code_manager_config_version.rb" ${ENVIRONMENTPATH} $2
515elif [ -e /opt/puppetlabs/server/pe_version ]
616then
7- /opt/puppetlabs/puppet/bin/ruby $1 /$2 /scripts/config_version.rb $1 $2
17+ /opt/puppetlabs/puppet/bin/ruby " ${ENVIRONMENTPATH} /$2 /scripts/config_version.rb" ${ENVIRONMENTPATH} $2
818else
919 /usr/bin/git --version > /dev/null 2>&1 &&
10- /usr/bin/git --git-dir $1 /$2 /.git rev-parse HEAD ||
20+ /usr/bin/git --git-dir " ${ENVIRONMENTPATH} /$2 /.git" rev-parse HEAD ||
1121 date +%s
1222fi
You can’t perform that action at this time.
0 commit comments