4 Star 18 Fork 184

Fengguang/lkp-tests

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
adapt-packages 559 Bytes
一键复制 编辑 原始数据 按行查看 历史
Fengguang 提交于 2022-12-04 10:26 +08:00 . adapt-packages: fix syntax error
#!/usr/bin/env ruby
# usage:
# cat $LKP_SRC/distro/depends/* | $LKP_SRC/sbin/adapt-packages $os
# output:
# package names for $os
require 'yaml'
require 'set'
adapt = YAML.load_file ENV['LKP_SRC'] + '/distro/adaptation/' + ARGV[0]
pkgs = Set.new
while (line = STDIN.gets)
next if line.start_with?('#')
line.chomp.split.each do |pkg|
pkg = pkg.sub /\/unstable$/, ''
next if pkg.start_with?('(')
if adapt.include? pkg
pkgs << adapt[pkg].split if adapt[pkg]
else
pkgs.add pkg
end
end
end
pkgs.each { |p| puts p }
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wu_fengguang/lkp-tests.git
git@gitee.com:wu_fengguang/lkp-tests.git
wu_fengguang
lkp-tests
lkp-tests
master

搜索帮助