diff options
Diffstat (limited to 'scripts/no-dir-check')
-rwxr-xr-x | scripts/no-dir-check | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/no-dir-check b/scripts/no-dir-check new file mode 100755 index 00000000000..bbb303da9b2 --- /dev/null +++ b/scripts/no-dir-check @@ -0,0 +1,9 @@ +#!/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 |