update scan
This commit is contained in:
parent
13dce28303
commit
3105a74320
2 changed files with 12 additions and 4 deletions
3
make.sh
3
make.sh
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Updating perms"
|
||||
chmod -R 777 .
|
||||
|
||||
echo "[i] GitLab License Generator"
|
||||
echo "[i] Copyright (c) 2023 Tim Cook, All Rights Not Reserved"
|
||||
LICENSE_NAME="${LICENSE_NAME:-"Tim Cook"}"
|
||||
|
|
|
@ -7,8 +7,12 @@ require 'optparse'
|
|||
OptionParser.new do |opts|
|
||||
opts.banner = "Usage: scan.features.rb [options]"
|
||||
|
||||
opts.on("-s", "--src-dir PATH", "Specify gitlab source dir (required)") do |v|
|
||||
GITLAB_SRC_DIR = File.expand_path(v)
|
||||
opts.on("-s", "--src-dir PATH", "Specify gitlab source dir (required if --features-file is ommited)") do |v|
|
||||
GITLAB_FEATURES_FILE="#{File.expand_path(v)}/ee/app/models/gitlab_subscriptions/features.rb"
|
||||
end
|
||||
|
||||
opts.on("-f", "--features-file PATH", "Specify gitlab features path (required if --src-dir is ommited)") do |v|
|
||||
GITLAB_FEATURES_FILE = File.expand_path(v)
|
||||
end
|
||||
|
||||
opts.on("-o", "--output PATH", "Output to json file (required)") do |v|
|
||||
|
@ -22,11 +26,12 @@ OptionParser.new do |opts|
|
|||
end
|
||||
.parse!
|
||||
|
||||
if GITLAB_SRC_DIR.nil? || EXPORT_JSON_FILE.nil?
|
||||
if GITLAB_FEATURES_FILE.nil? || EXPORT_JSON_FILE.nil?
|
||||
puts "[!] missing required options"
|
||||
puts "[!] use -h for help"
|
||||
exit 1
|
||||
end
|
||||
puts "Reading features from #{GITLAB_FEATURES_FILE}"
|
||||
|
||||
def ignore_exception
|
||||
begin
|
||||
|
@ -37,7 +42,7 @@ end
|
|||
|
||||
puts "[*] loading features.rb..."
|
||||
ignore_exception do
|
||||
require_relative "#{GITLAB_SRC_DIR}/ee/app/models/gitlab_subscriptions/features.rb"
|
||||
require_relative "#{GITLAB_FEATURES_FILE}"
|
||||
end
|
||||
|
||||
ALL_FEATURES = []
|
||||
|
|
Loading…
Reference in a new issue