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
f69606f5
Commit
f69606f5
authored
May 11, 2017
by
Ed Reel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update crew and install.sh to remove the need for sudo
parent
3995b637
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
22 deletions
+21
-22
crew
crew
+14
-15
install.sh
install.sh
+7
-7
No files found.
crew
View file @
f69606f5
...
...
@@ -262,11 +262,11 @@ def install_package (pkgdir)
FileUtils
.
mv
'filelist'
,
CREW_CONFIG_PATH
+
"meta/
#{
@pkg
.
name
}
.filelist"
File
.
open
(
CREW_CONFIG_PATH
+
"meta/
#{
@pkg
.
name
}
.directorylist"
).
each_line
do
|
line
|
system
"
sudo"
,
"
mkdir"
,
"-p"
,
line
.
chomp
system
"mkdir"
,
"-p"
,
line
.
chomp
end
File
.
open
(
CREW_CONFIG_PATH
+
"meta/
#{
@pkg
.
name
}
.filelist"
).
each_line
do
|
line
|
system
"
sudo"
,
"
mv"
,
pkgdir
+
line
.
chomp
,
line
.
chomp
system
"mv"
,
pkgdir
+
line
.
chomp
,
line
.
chomp
end
end
end
...
...
@@ -547,10 +547,9 @@ when "build"
search
@pkgName
resolve_dependencies_and_build
when
"remove"
abort
'Removing actions must be ran with sudo.'
unless
USER
==
'root'
remove
@pkgName
when
nil
puts
"Chromebrew, version 0.4.
1
"
puts
"Chromebrew, version 0.4.
2
"
puts
"Usage: crew [command] [package]"
puts
"Available commands: build, download, install, remove, search, update, upgrade, whatprovides"
else
...
...
install.sh
View file @
f69606f5
...
...
@@ -25,9 +25,12 @@ case "$architecture" in
exit
1
;;
esac
#This will allow things to work without sudo
sudo chown
-R
`
id
-u
`
:
`
id
-g
`
/usr/local
#prepare directories
for
dir
in
$CREW_LIB_PATH
$CREW_CONFIG_PATH
$CREW_CONFIG_PATH
/meta
$CREW_BREW_DIR
$CREW_DEST_DIR
$CREW_PACKAGES_PATH
;
do
sudo mkdir
-p
$dir
&&
sudo chown
-R
$USER
:
$USER
$dir
mkdir
-p
$dir
done
#prepare url and sha256
...
...
@@ -96,7 +99,7 @@ function extract_install () {
rm
-rf
./usr
tar
-xf
$2
echo
"Installing
$1
(this may take a while)..."
sudo tar
cf - ./usr/
*
|
(
cd
/
;
sudo tar
xp
--keep-directory-symlink
-f
-
)
tar
cf - ./usr/
*
mv
./dlist
$CREW_CONFIG_PATH
/meta/
$1
.directorylist
mv
./filelist
$CREW_CONFIG_PATH
/meta/
$1
.filelist
}
...
...
@@ -156,7 +159,7 @@ rm -rf crew lib packages
wget
-N
$URL
/crew
chmod
+x crew
rm
-f
$CREW_PREFIX
/bin/crew
sudo
ln
-s
`
pwd
`
/crew
$CREW_PREFIX
/bin
ln
-s
`
pwd
`
/crew
$CREW_PREFIX
/bin
#install crew library
mkdir
-p
$CREW_LIB_PATH
/lib
cd
$CREW_LIB_PATH
/lib
...
...
@@ -165,10 +168,7 @@ wget -N $URL/lib/package_helpers.rb
#Making GCC act like CC (For some npm packages out there)
rm
-f
/usr/local/bin/cc
sudo ln
-s
/usr/local/bin/gcc /usr/local/bin/cc
#This will allow a lot of things to work without sudo
sudo chown
-R
`
id
-u
`
:
`
id
-g
`
/usr/local
ln
-s
/usr/local/bin/gcc /usr/local/bin/cc
#prepare sparse checkout .rb packages directory and do it
cd
$CREW_LIB_PATH
...
...
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