When installing in different prefixes, prefix + '/bin' may not exist.

This commit is contained in:
Adriano Bonat 2010-03-31 09:38:05 -03:00
parent f9b028b78c
commit 2172878f21
1 changed files with 2 additions and 1 deletions

View File

@ -13,8 +13,9 @@ option '-p', '--prefix [DIR]', 'set the installation prefix for `cake install`'
task 'install', 'install CoffeeScript into /usr/local (or --prefix)', (options) ->
base: options.prefix or '/usr/local'
lib: base + '/lib/coffee-script'
bin: base + '/bin'
exec([
'mkdir -p ' + lib
'mkdir -p ' + lib + ' ' + bin
'cp -rf bin lib LICENSE README package.json src vendor ' + lib
'ln -sf ' + lib + '/bin/coffee ' + base + '/bin/coffee'
'ln -sf ' + lib + '/bin/cake ' + base + '/bin/cake'