Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chromebrew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
chromebrew
Commits
e1d2b4f4
Commit
e1d2b4f4
authored
Nov 24, 2020
by
vincowl
Committed by
GitHub
Nov 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[composer] fix ~/.config recursive symbolic link and existing files (#4587)
parent
c6d12349
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
packages/composer.rb
packages/composer.rb
+3
-3
No files found.
packages/composer.rb
View file @
e1d2b4f4
...
@@ -3,7 +3,7 @@ require 'package'
...
@@ -3,7 +3,7 @@ require 'package'
class
Composer
<
Package
class
Composer
<
Package
description
'Dependency Manager for PHP'
description
'Dependency Manager for PHP'
homepage
'https://getcomposer.org/'
homepage
'https://getcomposer.org/'
version
'2.0.7'
version
'2.0.7
-1
'
compatibility
'all'
compatibility
'all'
source_url
'https://github.com/composer/composer/archive/2.0.7.tar.gz'
source_url
'https://github.com/composer/composer/archive/2.0.7.tar.gz'
source_sha256
'204215dccc01fea015de5c8506100a078c821fe31afb3eee5aa93c5841f83f4d'
source_sha256
'204215dccc01fea015de5c8506100a078c821fe31afb3eee5aa93c5841f83f4d'
...
@@ -14,7 +14,7 @@ class Composer < Package
...
@@ -14,7 +14,7 @@ class Composer < Package
def
self
.
preinstall
def
self
.
preinstall
if
Dir
.
exists?
(
"
#{
HOME
}
/.config"
)
&&
!
File
.
symlink?
(
"
#{
HOME
}
/.config"
)
if
Dir
.
exists?
(
"
#{
HOME
}
/.config"
)
&&
!
File
.
symlink?
(
"
#{
HOME
}
/.config"
)
# Save any existing configuration
# Save any existing configuration
FileUtils
.
cp_r
"
#{
HOME
}
/.config"
,
"
#{
CREW_PREFIX
}
"
unless
Dir
.
empty?
"
#{
HOME
}
/.config"
FileUtils
.
cp_r
"
#{
HOME
}
/.config"
,
"
#{
CREW_PREFIX
}
"
,
remove_destination:
true
unless
Dir
.
empty?
"
#{
HOME
}
/.config"
else
else
# Remove the symlink, if it exists
# Remove the symlink, if it exists
FileUtils
.
rm_f
"
#{
HOME
}
/.config"
FileUtils
.
rm_f
"
#{
HOME
}
/.config"
...
@@ -25,10 +25,10 @@ class Composer < Package
...
@@ -25,10 +25,10 @@ class Composer < Package
system
"curl -Ls -o composer https://github.com/composer/composer/releases/download/
#{
version
}
/composer.phar"
system
"curl -Ls -o composer https://github.com/composer/composer/releases/download/
#{
version
}
/composer.phar"
abort
'Checksum mismatch. :/ Try again.'
.
lightred
unless
Digest
::
SHA256
.
hexdigest
(
File
.
read
(
'composer'
)
)
==
'0a060e8caf1d5cde55c4562fd68369b08cf231b8fd30da9c8f994b111557ebe9'
abort
'Checksum mismatch. :/ Try again.'
.
lightred
unless
Digest
::
SHA256
.
hexdigest
(
File
.
read
(
'composer'
)
)
==
'0a060e8caf1d5cde55c4562fd68369b08cf231b8fd30da9c8f994b111557ebe9'
system
"install -Dm755 composer
#{
CREW_DEST_PREFIX
}
/bin/composer"
system
"install -Dm755 composer
#{
CREW_DEST_PREFIX
}
/bin/composer"
FileUtils
.
ln_sf
"
#{
CREW_PREFIX
}
/.config"
,
"
#{
HOME
}
/.config"
end
end
def
self
.
postinstall
def
self
.
postinstall
FileUtils
.
ln_sf
"
#{
CREW_PREFIX
}
/.config"
,
"
#{
HOME
}
/.config"
puts
puts
puts
"To finish the installation, execute the following:"
.
lightblue
puts
"To finish the installation, execute the following:"
.
lightblue
puts
"echo 'export PATH=
\$
HOME/.config/composer/vendor/bin:
\$
PATH' >> ~/.bashrc && . ~/.bashrc"
.
lightblue
puts
"echo 'export PATH=
\$
HOME/.config/composer/vendor/bin:
\$
PATH' >> ~/.bashrc && . ~/.bashrc"
.
lightblue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment