multi_repo 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/exe/multi_repo +23 -20
- data/lib/multi_repo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f35b21a8b627819ec3d5884167260ba7d3887d3766cf5ea14d93ec717e1faaf
|
4
|
+
data.tar.gz: 1c1ba25b23f728b5284cf5947b44527482ba1bd2967a7a3d3026b7ba2c3b145e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6022d318abee6743deddfdf0bd3e33a421161682c9c9f5e5bade18049e2c0982cb46651a96d05c369334ae969bb9ec17dd4eeba776bea36e48964d9f5dc19d34
|
7
|
+
data.tar.gz: 21ce3ed99d97f4fc2538e9e31ea610ff65420fe2937ed77c3418bceaac63def8033e5104b7232612459a89a6f2099554a89cf09c5189ac2f2372d725c5c48056
|
data/.gitignore
CHANGED
data/exe/multi_repo
CHANGED
@@ -1,29 +1,32 @@
|
|
1
|
-
#!/bin/
|
1
|
+
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
SCRIPT_DIR=
|
3
|
+
SCRIPT_DIR = File.expand_path("../scripts", __dir__)
|
4
4
|
|
5
|
-
usage
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
echo
|
11
|
-
echo "Available scripts:"
|
12
|
-
for f in $(ls -1 "$SCRIPT_DIR" | sort); do
|
13
|
-
echo " $f"
|
14
|
-
done
|
15
|
-
}
|
5
|
+
def usage
|
6
|
+
puts "Usage: multi_repo <script> [args]"
|
7
|
+
puts " script Script to run"
|
8
|
+
puts " args Arguments to pass to the script"
|
9
|
+
puts " -h, --help Show this help message"
|
16
10
|
|
17
|
-
|
11
|
+
available_scripts = Dir.children(SCRIPT_DIR).sort.map { |f| " #{f}"}
|
12
|
+
puts
|
13
|
+
puts "Available scripts:"
|
14
|
+
puts available_scripts
|
15
|
+
end
|
16
|
+
|
17
|
+
script, args = ARGV[0], ARGV[1..]
|
18
|
+
|
19
|
+
if script.nil? || script.empty? || script == "--help" || script == "-h"
|
18
20
|
usage
|
19
21
|
exit
|
20
|
-
|
22
|
+
end
|
21
23
|
|
22
|
-
|
23
|
-
|
24
|
-
|
24
|
+
fq_script = File.join(SCRIPT_DIR, script)
|
25
|
+
unless File.exist?(fq_script)
|
26
|
+
puts "ERROR: script #{script.inspect} not found"
|
27
|
+
puts
|
25
28
|
usage
|
26
29
|
exit 1
|
27
|
-
|
30
|
+
end
|
28
31
|
|
29
|
-
exec
|
32
|
+
exec fq_script, *args
|
data/lib/multi_repo/version.rb
CHANGED