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
3d3e31c2
Commit
3d3e31c2
authored
Feb 17, 2017
by
Kazushi (Jam) Marukawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply @uberhacker suggestions
parent
8e587f89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
install.sh
install.sh
+7
-5
No files found.
install.sh
View file @
3d3e31c2
...
...
@@ -81,28 +81,30 @@ sudo ln -s `pwd`/crew $CREW_PREFIX/bin
mkdir
$CREW_LIB_PATH
/lib
&&
cd
$CREW_LIB_PATH
/lib
wget
-N
-c
$URL
/lib/package.rb
wget
-N
-c
$URL
/lib/package_helpers.rb
#create the device.json file
#create or update the device.json file
ruby_version
=
'2.0.0p247'
cd
$CREW_CONFIG_PATH
if
[
!
-f
device.json
]
;
then
echo
"Creating
device.json newly
..."
echo
"Creating
new device.json
..."
echo
'{'
>
device.json
echo
' "architecture": "'
$architecture
'",'
>>
device.json
echo
' "installed_packages": ['
>>
device.json
echo
' {'
>>
device.json
echo
' "name": "ruby",'
>>
device.json
echo
' "version": "
2.0.0p247
"'
>>
device.json
echo
' "version": "
'
$ruby_version
'
"'
>>
device.json
echo
' }'
>>
device.json
echo
' ]'
>>
device.json
echo
'}'
>>
device.json
elif
grep
'"name": "ruby"'
device.json
>
/dev/null
;
then
echo
"Updating version number of existing information in device.json..."
sed
-i
device.json
-e
'/"name": "ruby"/N;//s/"version": ".*"/"version": "
2.0.0p247
"/'
sed
-i
device.json
-e
'/"name": "ruby"/N;//s/"version": ".*"/"version": "
'
$ruby_version
'
"/'
else
echo
"Adding new information to device.json..."
sed
-i
device.json
-e
'/ }$/s/$/,\
{\
"name": "ruby",\
"version": "
2.0.0p247
"\
"version": "
'
$ruby_version
'
"\
}/'
fi
...
...
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