debian-mirror-gitlab/scripts/no-dir-check

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
341 B
Text
Raw Permalink Normal View History

2021-12-11 22:18:48 +05:30
#!/usr/bin/env ruby
# frozen_string_literal: true
dir_name = ARGV.first || abort('ERROR: Please specify a directory.')
dir_path = File.expand_path(dir_name, "#{__dir__}/..")
if Dir.exist?(dir_path)
abort("ERROR: This repository contains #{dir_name}/ directory. #{dir_name.upcase} changes should go to the corresponding repository.")
end