Sha256: d5ad250df8a1ff966d70ed0d3c9da56cbf7b6eace41c280512ff34f565585a67
Contents?: true
Size: 1.47 KB
Versions: 27
Compression:
Stored size: 1.47 KB
Contents
#-- # Copyright (C) 2009-2013 Novell, Inc. # This library is free software; you can redistribute it and/or modify # it only under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #++ require 'rake' namespace :check do desc "Check for installed osc client and its configuration" task :osc do puts "* Starting osc check..." if verbose `which osc` if $?.exitstatus != 0 raise "osc client is not installed. Please run:\nsudo zypper in osc" end obs_api = Packaging::Configuration.instance.obs_api command_to_set_osc = "osc -A #{obs_api}" osc_rc = File.expand_path("~/.oscrc") if !File.exists? osc_rc raise "missing ~/.oscrc file, please run:\n#{command_to_set_osc}" end `grep -c '\[#{obs_api}\]' #{osc_rc}` if $?.exitstatus != 0 "osc doesn't have set password for '#{obs_api}'." + " Please run:\n#{command_to_set_osc}" end puts "* Done. Everything looks good." if verbose end end
Version data entries
27 entries across 27 versions & 1 rubygems