bin/imgkit in imgkit-1.3.6 vs bin/imgkit in imgkit-1.3.7
- old
+ new
@@ -49,21 +49,21 @@
end
def install(download, arch, install_to)
puts "Installing #{download} to #{install_to}"
if download =~ /.tar.bz2$/
- `sudo tar xjvf #{download}`
- `sudo mv wkhtmltoimage-#{arch} #{install_to}`
+ `tar xjvf #{download}`
+ `mv wkhtmltoimage #{install_to}`
elsif download =~ /.tar.lzma$/
raise "couldn't extract archive: lzcat not found" unless system("which lzcat > /dev/null 2>/dev/null")
puts "Warning: lzcat is broken on Ubuntu. Re-run with --use-bzip to install alternate version"
- `sudo lzcat #{download} | tar x`
- `sudo mv wkhtmltoimage-#{arch} #{install_to}`
+ `lzcat #{download} | tar x`
+ `mv wkhtmltoimage-#{arch} #{install_to}`
else
- `sudo mv #{download} #{install_to}`
+ `mv #{download} #{install_to}`
end
- `sudo chmod +x #{install_to}`
+ `chmod +x #{install_to}`
end
@command = Proc.new { puts "Nothing to do: use --help"}
OptionParser.new do |parser|
@@ -74,10 +74,10 @@
end
parser.on("--install-wkhtmltoimage", "Install wkhtmltoimage binaries (TO=/usr/local/bin ARCHITECTURE=i386)") do
@command = Proc.new do
architecture = ENV['ARCHITECTURE'] || detect_architecture
- install_to = ENV['TO']+'/wkhtmltoimage' || IMGKit.configuration.wkhtmltoimage
+ install_to = ENV['TO'] ? ENV['TO']+'/wkhtmltoimage' : IMGKit.configuration.wkhtmltoimage
Dir.chdir '/tmp'
cleanup(install_to)
download = download_wkhtmltoimage(architecture)