|
12 | 12 | $tapsdir = $homebrew::config::tapsdir, |
13 | 13 | $brewsdir = $homebrew::config::brewsdir, |
14 | 14 | $min_revision = $homebrew::config::min_revision, |
| 15 | + $repo = 'Homebrew/homebrew', |
15 | 16 | $set_cflags = true, |
16 | 17 | $set_ldflags = true, |
17 | 18 | ) inherits homebrew::config { |
18 | 19 | include boxen::config |
19 | 20 | include homebrew::repo |
20 | 21 |
|
21 | | - repository { $installdir: |
22 | | - source => 'Homebrew/homebrew', |
23 | | - user => $::boxen_user |
| 22 | + file { [$installdir, |
| 23 | + "${installdir}/bin", |
| 24 | + "${installdir}/etc", |
| 25 | + "${installdir}/include", |
| 26 | + "${installdir}/lib", |
| 27 | + "${installdir}/lib/pkgconfig", |
| 28 | + "${installdir}/Library", |
| 29 | + "${installdir}/sbin", |
| 30 | + "${installdir}/share", |
| 31 | + "${installdir}/share/locale", |
| 32 | + "${installdir}/share/man", |
| 33 | + "${installdir}/share/man/man1", |
| 34 | + "${installdir}/share/man/man2", |
| 35 | + "${installdir}/share/man/man3", |
| 36 | + "${installdir}/share/man/man4", |
| 37 | + "${installdir}/share/man/man5", |
| 38 | + "${installdir}/share/man/man6", |
| 39 | + "${installdir}/share/man/man7", |
| 40 | + "${installdir}/share/man/man8", |
| 41 | + "${installdir}/share/info", |
| 42 | + "${installdir}/share/doc", |
| 43 | + "${installdir}/share/aclocal", |
| 44 | + "${installdir}/var", |
| 45 | + "${installdir}/var/log", |
| 46 | + ]: |
| 47 | + ensure => 'directory', |
| 48 | + owner => $::boxen_user, |
| 49 | + group => 'admin', |
| 50 | + mode => '0755', |
| 51 | + require => undef, |
| 52 | + before => Exec["install homebrew to ${installdir}"], |
| 53 | + } |
| 54 | + |
| 55 | + exec { "install homebrew to ${installdir}": |
| 56 | + command => "git init -q && |
| 57 | + git config remote.origin.url https://github.com/${repo} && |
| 58 | + git config remote.origin.fetch master:refs/remotes/origin/master && |
| 59 | + git fetch origin master:refs/remotes/origin/master -n && |
| 60 | + git reset --hard origin/master", |
| 61 | + cwd => $installdir, |
| 62 | + user => $::boxen_user, |
| 63 | + creates => "${installdir}/.git", |
| 64 | + require => File[$installdir], |
24 | 65 | } |
25 | 66 |
|
26 | 67 | File { |
27 | | - require => Repository[$installdir] |
| 68 | + require => Exec["install homebrew to ${installdir}"], |
28 | 69 | } |
29 | 70 |
|
30 | 71 | # Remove the old monkey patches, from pre #39 |
|
34 | 75 | } |
35 | 76 |
|
36 | 77 | file { |
37 | | - [$cachedir, $tapsdir, $cmddir, $libdir]: |
| 78 | + [$cachedir, $tapsdir, $cmddir]: |
38 | 79 | ensure => 'directory' ; |
39 | 80 |
|
40 | 81 | # shim for bottle hooks |
|
0 commit comments