Commit 3b4b504a authored by Cassandra Watergate's avatar Cassandra Watergate Committed by GitHub

License notice (#5582)

* add license notice

* bump chromebrew version

* if, else => case, when

* constant LICENSE => CREW_LICENSE
parent f12750ff
......@@ -47,6 +47,22 @@ Usage:
version #{CREW_VERSION}
DOCOPT
CREW_LICENSE = <<~LICENSESTRING
Copyright (C) 2021 Chromebrew Authors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html.
LICENSESTRING
# Set XZ_OPT environment variable for build command.
# If CREW_XZ_OPT is defined, use it by default. Use `-7e`, otherwise.
ENV["XZ_OPT"] = ENV['CREW_XZ_OPT'] || "-7e -T #{CREW_NPROC}"
......@@ -61,9 +77,13 @@ begin
args['<name>'] = args['<name>'].map { |arg| arg.gsub('-','_') } if args['<name>']
rescue Docopt::Exit => e
if ARGV[0] then
if ARGV[0] == '-V' or ARGV[0] == '--version' then
case ARGV[0]
when '-V', '--version'
puts CREW_VERSION
exit 0
when '-L', '--license'
puts CREW_LICENSE
exit 0
end
if ARGV[0] != '-h' and ARGV[0] != '--help' then
puts "Could not understand \"crew #{ARGV.join(' ')}\".".lightred
......
# Defines common constants used in different parts of crew
CREW_VERSION = '1.7.20'
CREW_VERSION = '1.7.21'
ARCH_ACTUAL = `uname -m`.strip
# This helps with virtualized builds on aarch64 machines
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment