From 772e403e40d7d7e2c34e3c0a8d9f51ec589fb01a Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Thu, 25 Feb 2016 19:14:44 +0100 Subject: [PATCH] Man page copying: only copy .1 - check if possible first --- Rakefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 6e525a6..6922c31 100644 --- a/Rakefile +++ b/Rakefile @@ -12,10 +12,12 @@ RSpec::Core::RakeTask.new(:rspec) task :create_man do |_t| os_prefix = "/usr/local" man_prefix = Pathname("#{os_prefix}/share/man/man1") - man_pages = "man/git-*" + man_pages = "man/git-*.1" Pathname.glob(man_pages) do |path| - FileUtils.cp(path, man_prefix + path.basename) + if path.exist? && man_prefix.exist? + FileUtils.cp(path, man_prefix + path.basename) + end end end