#794: refactoring of #detele_repositories_directory
This commit is contained in:
parent
218374f7a6
commit
d0b288fe37
|
@ -77,10 +77,8 @@ class Repository < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def detele_repositories_directory(repository_path)
|
||||
Arch.pluck(:name).each do |arch|
|
||||
system("rm -rf #{repository_path}/#{arch}/#{name}")
|
||||
end
|
||||
system("rm -rf #{repository_path}/SRPMS/#{name}")
|
||||
srpm_and_arches = (['SRPM'] << Arch.pluck(:name)).join(',')
|
||||
`bash -c 'rm -rf #{repository_path}/{#{srpm_and_arches}}/#{name}'`
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue