Sha256: e572c91b77295128ba2a054a152daa5b1f1b702eea6a0aa44731f7f378d9f74c

Contents?: true

Size: 1.02 KB

Versions: 82

Compression:

Stored size: 1.02 KB

Contents

#!/bin/bash
#
# Make sure that old facter cruft is removed
# This also allows us to downgrade facter as
# it's more likely that installing old versions
# over new will cause issues.
#
# ${3} is the destination volume so that this works correctly
# when being installed to volumes other than the current OS.

<%- ["@apple_libdir", "@apple_sbindir", "@apple_bindir", "@apple_docdir", "@package_name"].each do |i| -%>
  <%- val = instance_variable_get(i) -%>
  <%- raise "Critical variable #{i} is unset!" if val.nil? or val.empty? -%>
<%- end -%>

# remove ruby library files
<%- Dir.chdir("lib") do -%>
  <%- [@apple_old_libdir, @apple_libdir].compact.each do |libdir| -%>
    <%- Dir.glob("*").each do |file| -%>
/bin/rm -Rf "${3}<%= libdir %>/<%= file %>"
    <%- end -%>
  <%- end -%>
<%- end -%>

# remove bin files
<%- Dir.chdir("bin") do -%>
    <%- Dir.glob("*").each do |file| -%>
/bin/rm -Rf "${3}<%= @apple_bindir %>/<%= file %>"
  <%- end -%>
<%- end -%>

# remove old doc files
/bin/rm -Rf "${3}<%= @apple_docdir %>/<%= @package_name %>"

Version data entries

82 entries across 82 versions & 1 rubygems

Version Path
facter-2.5.7 ext/osx/preflight.erb
facter-2.5.7-x86-mingw32 ext/osx/preflight.erb
facter-2.5.7-x64-mingw32 ext/osx/preflight.erb
facter-2.5.7-universal-darwin ext/osx/preflight.erb
facter-2.5.6-x86-mingw32 ext/osx/preflight.erb
facter-2.5.6-x64-mingw32 ext/osx/preflight.erb
facter-2.5.6-universal-darwin ext/osx/preflight.erb
facter-2.5.6 ext/osx/preflight.erb
facter-2.5.5-x86-mingw32 ext/osx/preflight.erb
facter-2.5.5-x64-mingw32 ext/osx/preflight.erb
facter-2.5.5-universal-darwin ext/osx/preflight.erb
facter-2.5.5 ext/osx/preflight.erb
facter-2.5.4-x86-mingw32 ext/osx/preflight.erb
facter-2.5.4-x64-mingw32 ext/osx/preflight.erb
facter-2.5.4-universal-darwin ext/osx/preflight.erb
facter-2.5.4 ext/osx/preflight.erb
facter-2.5.1 ext/osx/preflight.erb
facter-2.5.1-x86-mingw32 ext/osx/preflight.erb
facter-2.5.1-x64-mingw32 ext/osx/preflight.erb
facter-2.5.1-universal-darwin ext/osx/preflight.erb