Last active
December 15, 2015 02:09
-
-
Save mriddle/5185266 to your computer and use it in GitHub Desktop.
Ability to add custom packages from within the Sublime Text 2 Puppet Module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Sublime Text 2 into /Applications | |
# | |
# Usage: | |
# | |
# include sublime_text_2 | |
class sublime_text_2 { | |
package { 'SublimeText2': | |
provider => 'appdmg', | |
source => 'http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.1.dmg'; | |
} | |
$base = "/Users/${::luser}/Library/Application Support" | |
$structure = [ "${base}/Sublime Text 2", "${base}/Sublime Text 2/Packages" ] | |
file { $structure: | |
ensure => 'directory', | |
owner => "${::luser}", | |
mode => '0755', | |
} | |
file { "${boxen::config::bindir}/subl": | |
ensure => link, | |
target => '/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl', | |
mode => '0755', | |
require => Package['SublimeText2'], | |
} | |
define addpkg { | |
$packagedir = "/Library/Application Support/Sublime Text 2/Packages/" | |
$pkgarray = split($name, '[/]') | |
$pkgname = $pkgarray[1] | |
exec { "git clone https://github.com/${name}.git": | |
cwd => "/Users/${::luser}${packagedir}", | |
provider => 'shell', | |
creates => "/Users/${::luser}${packagedir}${pkgname}", | |
path => "${boxen::config::homebrewdir}/bin", | |
require => [Package['SublimeText2'], Class['git']], | |
} | |
} | |
addpkg { [ | |
"jisaacks/GitGutter", | |
"surjikal/sublime-coffee-compile", | |
"jashkenas/coffee-script-tmbundle", | |
"revolunet/sublimetext-markdown-preview", | |
"SublimeColors/Solarized", | |
]: | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment