Check whether `eget` is installed or not, before the actual installation.
This commit is contained in:
parent
6d1e1599e3
commit
4f2aeaac41
|
@ -1,7 +1,14 @@
|
||||||
execute 'curl https://zyedidia.github.io/eget.sh | sh' do
|
result = run_command('which eget', error: false)
|
||||||
not_if 'which eget'
|
if result.exit_status != 0
|
||||||
cwd '/usr/local/bin/'
|
# Install eget
|
||||||
|
execute 'curl https://zyedidia.github.io/eget.sh | sh' do
|
||||||
|
cwd '/usr/local/bin/'
|
||||||
|
end
|
||||||
|
|
||||||
|
execute 'chown root:root /usr/local/bin/eget'
|
||||||
|
execute 'chmod 755 /usr/local/bin/eget'
|
||||||
end
|
end
|
||||||
|
|
||||||
execute 'chown root:root /usr/local/bin/eget'
|
%w( zyedidia/eget mgdm/htmlq ).each do |p|
|
||||||
execute 'chmod 755 /usr/local/bin/eget'
|
execute "eget #{p} --to /usr/local/bin/ --upgrade-only"
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in New Issue