Skip to content

Instantly share code, notes, and snippets.

@siyo
Last active December 16, 2015 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siyo/5486528 to your computer and use it in GitHub Desktop.
Save siyo/5486528 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
# update installed plugins / earthquake plugin
#
# Usage:
# $ :update_installed_plugins
#
Earthquake.init do
command :update_installed_plugins do
Dir.glob(File.dirname(__FILE__) + "/*.rb").each{|rb|
open(rb){|f|
f.read.split(/\n/).reverse[0..2].each{|line|
if line =~ %r|(https?://gist.github.com/.+)\s*$|
cmd = ":plugin_install #{$1}"
puts cmd.c(:info)
input(cmd)
break
end
}
}
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment