]> git.pld-linux.org Git - packages/coffee-script.git/blame - coffee-script-Cakefile.patch
- up to 1.6.3
[packages/coffee-script.git] / coffee-script-Cakefile.patch
CommitLineData
a58228a2
AM
1--- Cakefile~ 2012-10-23 13:45:31.000000000 -0700
2+++ Cakefile 2013-01-15 03:52:34.445701376 -0700
3@@ -45,22 +45,24 @@
4 console.log color + message + reset + ' ' + (explanation or '')
5
6 option '-p', '--prefix [DIR]', 'set the installation prefix for `cake install`'
7+option '-d', '--destdir [DIR]', 'set the installation destination for `cake install`'
8
9 task 'install', 'install CoffeeScript into /usr/local (or --prefix)', (options) ->
10+ destdir = options.destdir or ''
11 base = options.prefix or '/usr/local'
12- lib = "#{base}/lib/coffee-script"
13+ lib = "#{base}/lib/coffee-script"
14 bin = "#{base}/bin"
15- node = "~/.node_libraries/coffee-script"
16+ node = "#{base}/lib/node_modules/coffee-script"
17 console.log "Installing CoffeeScript to #{lib}"
18 console.log "Linking to #{node}"
19 console.log "Linking 'coffee' to #{bin}/coffee"
20 exec([
21- "mkdir -p #{lib} #{bin}"
22- "cp -rf bin lib LICENSE README package.json src #{lib}"
23- "ln -sfn #{lib}/bin/coffee #{bin}/coffee"
24- "ln -sfn #{lib}/bin/cake #{bin}/cake"
25- "mkdir -p ~/.node_libraries"
26- "ln -sfn #{lib}/lib/coffee-script #{node}"
27+ "mkdir -p #{destdir}/#{lib} #{destdir}/#{bin}"
28+ "cp -prf bin extras lib package.json src #{destdir}/#{lib}"
29+ "ln -sfn #{lib}/bin/coffee #{destdir}/#{bin}/coffee"
30+ "ln -sfn #{lib}/bin/cake #{destdir}/#{bin}/cake"
31+ "mkdir -p #{destdir}/#{node}"
32+ "ln -sfn #{lib}/lib/coffee-script #{destdir}/#{node}"
33 ].join(' && '), (err, stdout, stderr) ->
34 if err then console.log stderr.trim() else log 'done', green
35 )
This page took 0.063482 seconds and 4 git commands to generate.