Skip to content

Commit

Permalink
[FEATURE] Auto install of unox
Browse files Browse the repository at this point in the history
  • Loading branch information
mickaelperrin committed Aug 2, 2016
1 parent 84baa85 commit a4ae725
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/docker-sync/preconditions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@ def self.unison_available

def self.unox_available
if (find_executable0 'unison-fsmonitor').nil?
raise('Could not find unison-fsmonitor binary in path. Please install it, see https://github.com/hnsl/unox, or simply run :
curl "https://raw.githubusercontent.com/hnsl/unox/master/unox.py" -o "/usr/local/bin/unison-fsmonitor" \
if Thor::Shell::Basic.new.yes?("Could not find unison-fsmonitor binary in path. Please install unox before you continue, see https://github.com/hnsl/unox.\nShall I install unison-fsmonitor for you?")
`curl "https://raw.githubusercontent.com/hnsl/unox/master/unox.py" -o "/usr/local/bin/unison-fsmonitor" \
&& chmod +x /usr/local/bin/unison-fsmonitor`
else
raise('Please install it, see https://github.com/hnsl/unox, or simply run : curl "https://raw.githubusercontent.com/hnsl/unox/master/unox.py" -o "/usr/local/bin/unison-fsmonitor" \
&& chmod +x /usr/local/bin/unison-fsmonitor')
end
end
end
end
end

0 comments on commit a4ae725

Please sign in to comment.