FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
octocatalog-diff/script/puppet at master · github/octocatalog-diff · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
github
/
octocatalog-diff
Public
Notifications
You must be signed in to change notification settings
Fork
96
Star
252
Code
Issues
27
Pull requests
14
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
octocatalog-diff
/
script
/
puppet
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
28 lines (23 loc) · 1.03 KB
Breadcrumbs
octocatalog-diff
/
script
/
puppet
Copy path
File metadata and controls
executable file
·
28 lines (23 loc) · 1.03 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!
/usr/bin/env bash
DIR=
"
$(
cd
"
$(
dirname
"
${BASH_SOURCE[0]}
"
)
"
&&
cd
..
&&
pwd
)
"
#
This is to populate the variable expected by the Gemfile even under catalog-diff
#
(which strips out all non-essential environment variables, including this one).
#
This value is set by script/cibuild.
if
[
-f
"
${DIR}
/.puppet_version
"
]
;
then
export
PUPPET_VERSION=
$(
cat
"
${DIR}
/.puppet_version
"
)
fi
#
This is a hack to avoid having Puppet create $HOME/.puppetlabs. Hopefully Puppet
#
will eventually support ALL of the necessary overrides via the command line; right
#
now, $HOME/.puppetlabs/opt/facter/facts.d is hard-coded.
TEMPDIR=
$(
mktemp -d -t puppet-homedir-XXXXXX
)
function
cleanup()
{
rm -rf
"
${TEMPDIR}
"
}
trap
cleanup EXIT
#
Create directory structure in the temporary directory so that Puppet does not fail.
for
i
in
var opt/facter
;
do
mkdir -p
"
$TEMPDIR
/.puppetlabs/
$i
"
done
#
Actually run puppet with the home directory set to the temporary directory
BUNDLE_GEMFILE=
"
${DIR}
/Gemfile
"
HOME=
"
$TEMPDIR
"
bundle
exec
"
${DIR}
/bin/puppet
"
$*
exit
$?
Back
|
FazBrowse Home
|
New Git URL