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