mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-10 07:57:59 -05:00
Move crew (#5613)
* move crew and update symlinks * install.sh: fix #5612 * lib/const.rb: bump version
This commit is contained in:
committed by
GitHub
parent
6620980c62
commit
3a2bdf9df7
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env ruby
|
||||
require_relative 'lib/color'
|
||||
require_relative '../lib/color'
|
||||
|
||||
# Disallow sudo
|
||||
abort 'Chromebrew should not be run as root.'.lightred if Process.uid == 0
|
||||
@@ -10,9 +10,8 @@ require 'uri'
|
||||
require 'digest/sha2'
|
||||
require 'json'
|
||||
require 'fileutils'
|
||||
require 'securerandom'
|
||||
require_relative 'lib/const'
|
||||
require_relative 'lib/util'
|
||||
require_relative '../lib/const'
|
||||
require_relative '../lib/util'
|
||||
|
||||
# Add lib to LOAD_PATH
|
||||
$LOAD_PATH.unshift "#{CREW_LIB_PATH}lib"
|
||||
@@ -73,7 +72,7 @@ ENV["XZ_OPT"] = ENV['CREW_XZ_OPT'] || "-7e -T #{CREW_NPROC}"
|
||||
CURL = ENV['CURL'] || 'curl'
|
||||
|
||||
# Parse arguments using docopt
|
||||
require_relative 'lib/docopt'
|
||||
require_relative '../lib/docopt'
|
||||
begin
|
||||
args = Docopt::docopt(DOC)
|
||||
args['<name>'] = args['<name>'].map { |arg| arg.gsub('-','_') } if args['<name>']
|
||||
@@ -452,6 +451,10 @@ def update
|
||||
system 'git fetch origin master'
|
||||
system 'git reset --hard origin/master'
|
||||
end
|
||||
|
||||
# Update the symlink
|
||||
FileUtils.symlink "#{CREW_LIB_PATH}/bin/crew", "#{CREW_PREFIX}/bin/crew", force: true, verbose: @fileutils_verbose
|
||||
|
||||
puts 'Package lists, crew, and library updated.'
|
||||
|
||||
#update compatible packages
|
||||
@@ -684,9 +687,9 @@ end
|
||||
def prepare_package (destdir)
|
||||
Dir.chdir destdir do
|
||||
# Avoid /usr/local/share/info/dir{.gz} file conflict:
|
||||
# The install-info program maintains a directory of installed
|
||||
# info documents in /usr/share/info/dir for the use of info
|
||||
# readers. This file must not be included in packages other
|
||||
# The install-info program maintains a directory of installed
|
||||
# info documents in /usr/share/info/dir for the use of info
|
||||
# readers. This file must not be included in packages other
|
||||
# than install-info.
|
||||
# https://www.debian.org/doc/debian-policy/ch-docs.html#info-documents
|
||||
FileUtils.rm "#{CREW_DEST_PREFIX}/share/info/dir" if File.exist?("#{CREW_DEST_PREFIX}/share/info/dir")
|
||||
@@ -187,7 +187,7 @@ done
|
||||
sudo ldconfig &> /dev/null || true
|
||||
|
||||
# create symlink to 'crew' in ${CREW_PREFIX}/bin/
|
||||
ln -sfv "../lib/crew/crew" "${CREW_PREFIX}/bin/crew"
|
||||
ln -sfv "../lib/crew/bin/crew" "${CREW_PREFIX}/bin/"
|
||||
|
||||
# prepare sparse checkout .rb packages directory and do it
|
||||
cd "${CREW_LIB_PATH}"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Defines common constants used in different parts of crew
|
||||
|
||||
CREW_VERSION = '1.8.3'
|
||||
CREW_VERSION = '1.8.4'
|
||||
|
||||
ARCH_ACTUAL = `uname -m`.strip
|
||||
# This helps with virtualized builds on aarch64 machines
|
||||
|
||||
Reference in New Issue
Block a user