#!/usr/bin/env ruby require_relative '../lib/chromedriver_update' arg = ARGV[0] if %w[version -v --version].include?(arg) puts "#{ChromedriverUpdate::VERSION}" elsif arg.nil? || arg == '' || %w[force -f --force].include?(arg) force = %w[force -f --force].include?(arg) ChromedriverUpdate.auto_update_chromedriver force: force else puts <<-TEXT chromedriver_update #{ChromedriverUpdate::VERSION} https://github.com/magynhard/chromedriver_update chromedriver_update # automatically update the current chromedriver version fitting to the currently installed chrome chromedriver_update -f --force # force automatic update, even if the latest version is already installed chromedriver_update -h --help # show this info chromedriver_update -v --version # show the libraries current version TEXT end