代码拉取完成,页面将自动刷新
同步操作将从 openKylin-backup/foreman 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
require 'rake/clean'
load File.join(__dir__, 'lib', 'tasks', 'pkg.rake')
BUILDDIR = File.expand_path(ENV['BUILDDIR'] || '_build')
PREFIX = ENV['PREFIX'] || '/usr/local'
BINDIR = ENV['BINDIR'] || "#{PREFIX}/bin"
LIBDIR = ENV['LIBDIR'] || "#{PREFIX}/lib"
SBINDIR = ENV['SBINDIR'] || "#{PREFIX}/sbin"
INCLUDEDIR = ENV['INCLUDEDIR'] || "#{PREFIX}/include"
SYSCONFDIR = ENV['SYSCONFDIR'] || "#{PREFIX}/etc"
LOCALSTATEDIR = ENV['LOCALSTATEDIR'] || "#{PREFIX}/var"
SHAREDSTAREDIR = ENV['SHAREDSTAREDIR'] || "#{LOCALSTATEDIR}/lib"
DATAROOTDIR = DATADIR = ENV['DATAROOTDIR'] || "#{PREFIX}/share"
MANDIR = ENV['MANDIR'] || "#{DATAROOTDIR}/man"
def is_redhat; File.exist?("/etc/redhat-release"); end
def is_debian; File.exist?("/etc/debian-release"); end
file BUILDDIR do
mkdir BUILDDIR
end
file "#{BUILDDIR}/foreman-rake.8.gz" => "man/foreman-rake.8.asciidoc" do |t|
sh "a2x -d manpage -f manpage -D #{BUILDDIR}/ #{t.prerequisites[0]}"
sh "gzip -f9 #{BUILDDIR}/foreman-rake.8"
end
file "#{BUILDDIR}/foreman-debug.8.gz" => "man/foreman-debug.8.asciidoc" do |t|
sh "a2x -d manpage -f manpage -D #{BUILDDIR}/ #{t.prerequisites[0]}"
sh "gzip -f9 #{BUILDDIR}/foreman-debug.8"
end
file "#{BUILDDIR}/foreman-tail.8.gz" => "man/foreman-tail.8.asciidoc" do |t|
sh "a2x -d manpage -f manpage -D #{BUILDDIR}/ #{t.prerequisites[0]}"
sh "gzip -f9 #{BUILDDIR}/foreman-tail.8"
end
task :build => [
BUILDDIR,
"#{BUILDDIR}/foreman-rake.8.gz",
"#{BUILDDIR}/foreman-debug.8.gz",
"#{BUILDDIR}/foreman-tail.8.gz",
]
task :install => :build do |t|
mkdir_p "#{MANDIR}/man8"
cp "#{BUILDDIR}/foreman-rake.8.gz", "#{MANDIR}/man8/"
cp "#{BUILDDIR}/foreman-debug.8.gz", "#{MANDIR}/man8/"
cp "#{BUILDDIR}/foreman-tail.8.gz", "#{MANDIR}/man8/"
# foreman-tail
TAILDIR = ENV['TAILDIR'] || "script/foreman-tail.d"
mkdir_p "#{DATAROOTDIR}/foreman/#{TAILDIR}"
cp Dir.glob("#{TAILDIR}/common/*"), "#{DATAROOTDIR}/foreman/#{TAILDIR}/", :verbose => true
if is_redhat
cp Dir.glob("#{TAILDIR}/redhat/*"), "#{DATAROOTDIR}/foreman/#{TAILDIR}/", :verbose => true
elsif is_debian
cp Dir.glob("#{TAILDIR}/debian/*"), "#{DATAROOTDIR}/foreman/#{TAILDIR}/", :verbose => true
else
raise "Unsupported system"
end
# foreman-debug
DEBUGDIR = ENV['DEBUGDIR'] || "script/foreman-debug.d"
mkdir_p "#{DATAROOTDIR}/foreman/#{DEBUGDIR}"
# ssh
mkdir_p "#{DATAROOTDIR}/foreman/.ssh"
end
task :default => :build
CLEAN.include [
'_build',
]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。