Commit e506dc98 authored by Ed Reel's avatar Ed Reel Committed by GitHub

Update crew command (#5416)

parent 4fe3cb8c
...@@ -148,11 +148,10 @@ end ...@@ -148,11 +148,10 @@ end
def list_available def list_available
Dir[CREW_PACKAGES_PATH + '*.rb'].each do |filename| Dir[CREW_PACKAGES_PATH + '*.rb'].each do |filename|
@notInstalled = true notInstalled = true
packageName = File.basename filename, '.rb' pkgName = File.basename filename, '.rb'
@notInstalled = nil if File.exists? CREW_META_PATH + packageName + '.filelist' notInstalled = false if File.exists? CREW_META_PATH + pkgName + '.filelist'
if @notInstalled if notInstalled
pkgName = File.basename filename, '.rb'
set_package pkgName, filename set_package pkgName, filename
if @pkg.compatibility.include? 'all' or @pkg.compatibility.include? ARCH if @pkg.compatibility.include? 'all' or @pkg.compatibility.include? ARCH
puts pkgName puts pkgName
...@@ -164,9 +163,9 @@ def list_available ...@@ -164,9 +163,9 @@ def list_available
end end
def list_installed def list_installed
Dir[CREW_META_PATH + '*.directorylist'].sort.map { |f| Dir[CREW_META_PATH + '*.directorylist'].sort.map do |f|
File.basename(f, '.directorylist').lightgreen File.basename(f, '.directorylist').lightgreen
} end
end end
def list_compatible(compat = true) def list_compatible(compat = true)
...@@ -213,7 +212,7 @@ end ...@@ -213,7 +212,7 @@ end
def regexp_search(pkgPat) def regexp_search(pkgPat)
re = Regexp.new(pkgPat, true) re = Regexp.new(pkgPat, true)
results = Dir[CREW_PACKAGES_PATH + '.rb'].sort \ results = Dir[CREW_PACKAGES_PATH + '*.rb'].sort \
.select { |f| File.basename(f, '.rb') =~ re } \ .select { |f| File.basename(f, '.rb') =~ re } \
.each { |f| print_package(f, @opt_verbose) } .each { |f| print_package(f, @opt_verbose) }
if results.empty? if results.empty?
......
# Defines common constants used in different parts of crew # Defines common constants used in different parts of crew
CREW_VERSION = '1.7.14' CREW_VERSION = '1.7.15'
ARCH_ACTUAL = `uname -m`.strip ARCH_ACTUAL = `uname -m`.strip
# This helps with virtualized builds on aarch64 machines # This helps with virtualized builds on aarch64 machines
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment