Page Menu
Home
Solus
Search
Configure Global Search
Log In
Files
F612102
install.sh
rawbone (Robin Edser)
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
rawbone
Nov 12 2017, 6:10 PM
2017-11-12 18:10:00 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
install.sh
View Options
#!/bin/sh
# WARNING: REQUIRES /bin/sh
#
# Post install configuration for Chef Development Kit
#
PROGNAME
=
`
basename
$0
`
INSTALLER_DIR
=
/opt/chefdk
CONFIG_DIR
=
/etc/chef
USAGE
=
"usage:
$0
"
error_exit
()
{
echo
"
${
PROGNAME
}
:
${
1
:-
"Unknown Error"
}
"
1
>
&
2
exit
1
}
is_darwin
()
{
uname -v
|
grep
"^Darwin"
2
>
&
1
>/dev/null
}
is_smartos
()
{
uname -v
|
grep
"^joyent"
2
>
&
1
>/dev/null
}
if
is_smartos
;
then
PREFIX
=
"/opt/local"
elif
is_darwin
;
then
PREFIX
=
"/usr/local"
mkdir -p
"
$PREFIX
/bin"
else
PREFIX
=
"/usr"
fi
# We test for the presence of /usr/bin/chef-client to know if this script succeeds,
# so chef-client must appear as the last item here.
binaries
=
"berks chef chef-apply chef-shell chef-solo chef-vault cookstyle dco delivery foodcritic inspec kitchen knife ohai push-apply pushy-client pushy-service-manager chef-client"
# rm -f before ln -sf is required for solaris 9
for
binary
in
$binaries
;
do
rm -f
$PREFIX
/bin/
$binary
done
for
binary
in
$binaries
;
do
ln -sf
$INSTALLER_DIR
/bin/
$binary
$PREFIX
/bin
||
error_exit
"Cannot link
$binary
to
$PREFIX
/bin"
done
# Ensure all files/directories in $INSTALLER_DIR are owned by root. This
# has been fixed on new installs but upgrades from old installs need to
# be manually fixed.
chown -Rh
0
:0
$INSTALLER_DIR
echo
"Thank you for installing Chef Development Kit!"
exit
0
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
191360
Default Alt Text
install.sh (1 KB)
Attached To
Mode
T2260: ChefDK
Attached
Detach File
Event Timeline
Log In to Comment