Commit e1b50e68 authored by Sam Stephenson's avatar Sam Stephenson
Browse files

Ensure installed directories are not world-writable to avoid Bundler warnings

parent 7b4ee4cf
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ install_package() {
  cd "$package_name"
  build_package "$package_name" $*
  after_install_package "$package_name"
  fix_directory_permissions
  cd "$cwd"

  echo "Installed ${package_name} to ${PREFIX_PATH}" >&2
@@ -114,6 +115,11 @@ after_install_package() {
  local stub=1
}

fix_directory_permissions() {
  # Ensure installed directories are not world-writable to avoid Bundler warnings
  find "$PREFIX_PATH" -type d -exec chmod go-w {} \;
}

use_gcc42_on_lion() {
  if [ "$(uname -s)" = "Darwin" ]; then
    if [ "$(expr "$(sw_vers -productVersion | cut -f 2 -d .)" \>= 7 || true)" -eq 1 ]; then