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
4d3e327c
Commit
4d3e327c
authored
Jun 26, 2016
by
Michał Siwek
Committed by
GitHub
Jun 26, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #192 from lyxell/shorten_install
Clean up and shorten install.sh
parents
4ba0fab9
33b6705b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
37 deletions
+16
-37
install.sh
install.sh
+16
-37
No files found.
install.sh
View file @
4d3e327c
...
...
@@ -10,7 +10,6 @@ CREW_BREW_DIR=$CREW_PREFIX/tmp/crew/
CREW_DEST_DIR
=
$CREW_BREW_DIR
/dest
CREW_PACKAGES_PATH
=
$CREW_LIB_PATH
/packages
user
=
$(
whoami
)
architecture
=
$(
uname
-m
)
if
[
$EUID
-eq
0
]
;
then
...
...
@@ -24,12 +23,9 @@ if [ $architecture != "i686" ] && [ $architecture != "x86_64" ]; then
fi
#prepare directories
sudo mkdir
-p
$CREW_LIB_PATH
&&
sudo chown
-R
$USER
:
$USER
$CREW_LIB_PATH
sudo mkdir
-p
$CREW_CONFIG_PATH
&&
sudo chown
-R
$USER
:
$USER
$CREW_CONFIG_PATH
sudo mkdir
-p
$CREW_CONFIG_PATH
/meta
&&
sudo chown
-R
$USER
:
$USER
$CREW_CONFIG_PATH
/meta
sudo mkdir
-p
$CREW_BREW_DIR
&&
sudo chown
-R
$USER
:
$USER
$CREW_BREW_DIR
sudo mkdir
-p
$CREW_DEST_DIR
&&
sudo chown
-R
$USER
:
$USER
$CREW_DEST_DIR
sudo mkdir
-p
$CREW_PACKAGES_PATH
&&
sudo chown
-R
$USER
:
$USER
$CREW_PACKAGES_PATH
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
done
#cd into the brew directory, everything will happen there
cd
$CREW_BREW_DIR
...
...
@@ -39,16 +35,16 @@ echo "Downloading ruby..."
case
"
$architecture
"
in
"i686"
)
link
=
'https://dl.dropboxusercontent.com/s/tufbuqcn80ubypx/ruby-2.0.0p247-chromeos-i686.tar.gz
?token_hash=AAGu_5wuqZe2eDOkfL5oh4esQ8HAZJIvbMG7GplnQrSa3g&dl=1
'
link
=
'https://dl.dropboxusercontent.com/s/tufbuqcn80ubypx/ruby-2.0.0p247-chromeos-i686.tar.gz'
tarname
=
'ruby-2.0.0p247-chromeos-'
$architecture
'.tar.gz'
;;
"x86_64"
)
link
=
'https://dl.dropboxusercontent.com/s/3dw5ue5vhf5nj8k/ruby-2.0.0-p247-chromeos1-chromeos-x86_64.tar.gz
?dl=1&token_hash=AAHYJ-WOExuc2f4mKN3pDHUOlTMnt3h-rBosLmYr2Gvy7w
'
link
=
'https://dl.dropboxusercontent.com/s/3dw5ue5vhf5nj8k/ruby-2.0.0-p247-chromeos1-chromeos-x86_64.tar.gz'
tarname
=
'ruby-2.0.0-p247-chromeos1-chromeos-'
$architecture
'.tar.gz'
;;
esac
wget
-
-continue
--no-check-certificate
--content-disposition
$link
-O
$tarname
wget
-
c
$link
-O
$tarname
#extract and install ruby
echo
"Extracting ruby (this may take a while)..."
...
...
@@ -60,17 +56,16 @@ mv ./filelist $CREW_CONFIG_PATH/meta/ruby.filelist
#download, prepare and install chromebrew
cd
$CREW_LIB_PATH
wget
-N
-
-continue
--no-check-certificate
$URL
/crew
wget
-N
-
c
$URL
/crew
chmod
+x crew
sudo ln
-s
`
pwd
`
/crew
$CREW_PREFIX
/bin
#install crew library
mkdir
$CREW_LIB_PATH
/lib
&&
cd
$CREW_LIB_PATH
/lib
wget
-N
-
-continue
--no-check-certificate
$URL
/lib/package.rb
wget
-N
-
-continue
--no-check-certificate
$URL
/lib/package_helpers.rb
wget
-N
-
c
$URL
/lib/package.rb
wget
-N
-
c
$URL
/lib/package_helpers.rb
#create the device.json file
cd
$CREW_CONFIG_PATH
touch
device.json
echo
"{"
>
device.json
echo
'{'
>
device.json
echo
' "architecture": "'
$architecture
'",'
>>
device.json
echo
' "installed_packages": ['
>>
device.json
echo
' {'
>>
device.json
...
...
@@ -78,35 +73,19 @@ echo ' "name": "ruby",' >> device.json
echo
' "version": "2.0.0p247"'
>>
device.json
echo
' }'
>>
device.json
echo
' ]'
>>
device.json
echo
"}"
>>
device.json
echo
'}'
>>
device.json
#download git and its dependencies .rb package files
cd
$CREW_PACKAGES_PATH
wget
-N
--continue
--no-check-certificate
$URL
/packages/git.rb
wget
-N
--continue
--no-check-certificate
$URL
/packages/zlibpkg.rb
wget
-N
--continue
--no-check-certificate
$URL
/packages/libssh2.rb
wget
-N
--continue
--no-check-certificate
$URL
/packages/perl.rb
wget
-N
--continue
--no-check-certificate
$URL
/packages/curl.rb
wget
-N
--continue
--no-check-certificate
$URL
/packages/expat.rb
wget
-N
--continue
--no-check-certificate
$URL
/packages/gettext.rb
wget
-N
--continue
--no-check-certificate
$URL
/packages/python.rb
wget
-N
--continue
--no-check-certificate
$URL
/packages/readline.rb
wget
-N
--continue
--no-check-certificate
$URL
/packages/ruby.rb
wget
-N
--continue
--no-check-certificate
$URL
/packages/buildessential.rb
wget
-N
--continue
--no-check-certificate
$URL
/packages/gcc.rb
wget
-N
--continue
--no-check-certificate
$URL
/packages/binutils.rb
wget
-N
--continue
--no-check-certificate
$URL
/packages/make.rb
wget
-N
--continue
--no-check-certificate
$URL
/packages/mpc.rb
wget
-N
--continue
--no-check-certificate
$URL
/packages/mpfr.rb
wget
-N
--continue
--no-check-certificate
$URL
/packages/gmp.rb
wget
-N
--continue
--no-check-certificate
$URL
/packages/glibc.rb
wget
-N
--continue
--no-check-certificate
$URL
/packages/linuxheaders.rb
for
file
in
git zlibpkg libssh2 perl curl expat gettext python readline ruby buildessential gcc binutils make mpc mpfr gmp glibc linuxheaders
;
do
wget
-N
-c
$URL
/packages/
$file
.rb
done
#install readline for ruby
(
echo
y
;
)
| crew
install
readline
echo
y
| crew
install
readline
#install git
(
echo
y
;
)
| crew
install
git
echo
y
| crew
install
git
#Making GCC act like CC (For some npm packages out there)
ln
-s
/usr/local/bin/gcc /usr/local/bin/cc
...
...
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