Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/no-dir-check')
-rwxr-xr-xscripts/no-dir-check9
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