grunt.registerTask"check:fs","Check that local filesystem options are configured",()->
grunt.registerTask"check:fs","Check that local filesystem options are configured",()->
Helpers.checkFS@async()
Helpers.checkFS@async()
grunt.registerTask"check:aspell","Check that aspell is installed",()->
Helpers.checkAspell@async()
grunt.registerTask"check:make","Check that make is installed",()->
grunt.registerTask"check:make","Check that make is installed",()->
Helpers.checkMake@async()
Helpers.checkMake@async()
grunt.registerTask"check","Check that you have the required dependencies installed",["check:redis","check:latexmk","check:s3","check:fs"]
grunt.registerTask"check","Check that you have the required dependencies installed",["check:redis","check:latexmk","check:s3","check:fs","check:aspell"]
grunt.registerTask"build_deb","Build an installable .deb file from the current directory",()->
grunt.registerTask"build_deb","Build an installable .deb file from the current directory",()->
Helpers.buildDeb@async()
Helpers.buildDeb@async()
...
@@ -235,6 +237,33 @@ module.exports = (grunt) ->
...
@@ -235,6 +237,33 @@ module.exports = (grunt) ->
"""
"""
error=newError("latexmk is too old")
error=newError("latexmk is too old")
callback(error)
callback(error)
checkAspell:(callback=(error)->)->
grunt.log.write"Checking aspell is installed... "
exec"aspell dump dicts",(error,stdout,stderr)->
iferror?anderror.message.match("command not found")
grunt.log.error"FAIL."
grunt.log.errorlns"""
Either aspell is not installed or is not in your PATH.
On Ubuntu you can install aspell with:
sudo apt-get install aspell
Or on a mac:
brew install aspell
This is not a fatal error, but the spell-checker will not work
without aspell
"""
returncallback(error)
elseiferror?
returncallback(error)
else
grunt.log.writeln"OK."
grunt.log.writeln"The following spell check dictionaries are available:"
grunt.log.writestdout
callback()
callback(error)
checkS3:(callback=(error)->)->
checkS3:(callback=(error)->)->
Settings=require"settings-sharelatex"
Settings=require"settings-sharelatex"
...
@@ -269,7 +298,7 @@ module.exports = (grunt) ->
...
@@ -269,7 +298,7 @@ module.exports = (grunt) ->
Could not connect to Amazon S3. Please check your credentials.
Could not connect to Amazon S3. Please check your credentials.
"""
"""
else
else
grunt.log.write"OK."
grunt.log.writeln"OK."
callback()
callback()
else
else
grunt.log.writeln"Filestore other than S3 configured. Not checking S3."
grunt.log.writeln"Filestore other than S3 configured. Not checking S3."