Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
duniter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
typescript
duniter
Commits
f16fd141
Commit
f16fd141
authored
9 years ago
by
Cédric Moreau
Browse files
Options
Downloads
Patches
Plain Diff
Update install script + bump to alpha47
parent
5ad41e69
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
duniter.sh
+0
-0
0 additions, 0 deletions
duniter.sh
install.sh
+22
-22
22 additions, 22 deletions
install.sh
with
22 additions
and
22 deletions
ucoin
.sh
→
duniter
.sh
+
0
−
0
View file @
f16fd141
File moved
This diff is collapsed.
Click to expand it.
install.sh
+
22
−
22
View file @
f16fd141
...
...
@@ -6,12 +6,12 @@ ucoin_has() {
type
"
$1
"
>
/dev/null 2>&1
}
if
[
-z
"
$
UCOIN
_DIR
"
]
;
then
UCOIN
_DIR
=
"
$HOME
/.
ucoin
"
if
[
-z
"
$
DUNITER
_DIR
"
]
;
then
DUNITER
_DIR
=
"
$HOME
/.
duniter
"
fi
ucoin_latest_version
()
{
echo
"v0.20.0a4
1
"
echo
"v0.20.0a4
7
"
}
ucoin_repo_url
()
{
...
...
@@ -37,26 +37,26 @@ install_ucoin_from_git() {
local
PREVIOUS_PATH
PREVIOUS_PATH
=
$PATH
if
[
-d
"
$
UCOIN
_DIR
/.git"
]
;
then
echo
"=> ucoin is already installed in
$
UCOIN
_DIR
, trying to update using git"
if
[
-d
"
$
DUNITER
_DIR
/.git"
]
;
then
echo
"=> ucoin is already installed in
$
DUNITER
_DIR
, trying to update using git"
printf
"
\r
=> "
cd
"
$
UCOIN
_DIR
"
&&
(
command
git fetch 2> /dev/null
||
{
echo
>
&2
"Failed to update ucoin, run 'git fetch' in
$
UCOIN
_DIR
yourself."
&&
exit
1
cd
"
$
DUNITER
_DIR
"
&&
(
command
git fetch 2> /dev/null
||
{
echo
>
&2
"Failed to update ucoin, run 'git fetch' in
$
DUNITER
_DIR
yourself."
&&
exit
1
})
else
# Cloning to $
UCOIN
_DIR
echo
"=> Downloading ucoin from git to '
$
UCOIN
_DIR
'"
# Cloning to $
DUNITER
_DIR
echo
"=> Downloading ucoin from git to '
$
DUNITER
_DIR
'"
printf
"
\r
=> "
mkdir
-p
"
$
UCOIN
_DIR
"
command
git clone
"
$(
ucoin_repo_url
)
"
"
$
UCOIN
_DIR
"
mkdir
-p
"
$
DUNITER
_DIR
"
command
git clone
"
$(
ucoin_repo_url
)
"
"
$
DUNITER
_DIR
"
fi
cd
"
$
UCOIN
_DIR
"
&&
command
git checkout
--quiet
$(
ucoin_latest_version
)
if
[
!
-z
"
$(
cd
"
$
UCOIN
_DIR
"
&&
git show-ref refs/heads/master
)
"
]
;
then
cd
"
$
DUNITER
_DIR
"
&&
command
git checkout
--quiet
$(
ucoin_latest_version
)
if
[
!
-z
"
$(
cd
"
$
DUNITER
_DIR
"
&&
git show-ref refs/heads/master
)
"
]
;
then
if
git branch
--quiet
2>/dev/null
;
then
cd
"
$
UCOIN
_DIR
"
&&
command
git branch
--quiet
-D
master
>
/dev/null 2>&1
cd
"
$
DUNITER
_DIR
"
&&
command
git branch
--quiet
-D
master
>
/dev/null 2>&1
else
echo
>
&2
"Your version of git is out of date. Please update it!"
cd
"
$
UCOIN
_DIR
"
&&
command
git branch
-D
master
>
/dev/null 2>&1
cd
"
$
DUNITER
_DIR
"
&&
command
git branch
-D
master
>
/dev/null 2>&1
fi
fi
...
...
@@ -74,9 +74,9 @@ install_ucoin_from_git() {
fi
local
NODEJS_FILENAME
=
node-v
${
NVER
}
-linux-
${
ARCH
}
local
NODEJS_TARBALL
=
http://nodejs.org/dist/v
${
NVER
}
/
${
NODEJS_FILENAME
}
.tar.gz
local
NODEJS_ARCHIVE
=
$
UCOIN
_DIR
/node.tar.gz
local
NODEJS_EXTRACTED
=
$
UCOIN
_DIR
/
$NODEJS_FILENAME
if
[
!
-d
"
$
UCOIN
_DIR
/node"
]
;
then
local
NODEJS_ARCHIVE
=
$
DUNITER
_DIR
/node.tar.gz
local
NODEJS_EXTRACTED
=
$
DUNITER
_DIR
/
$NODEJS_FILENAME
if
[
!
-d
"
$
DUNITER
_DIR
/node"
]
;
then
echo
"=> Downloading '
$NODEJS_TARBALL
' to '
$NODEJS_ARCHIVE
'"
ucoin_download
"
$NODEJS_TARBALL
"
-o
"
$NODEJS_ARCHIVE
"
||
{
echo
>
&2
"Failed to download '
$NODEJS_TARBALL
'"
...
...
@@ -93,9 +93,9 @@ install_ucoin_from_git() {
fi
# Install uCoin dependencies (NPM modules)
export
PATH
=
$PATH
:
$
UCOIN
_DIR
/node/bin/
export
PATH
=
$PATH
:
$
DUNITER
_DIR
/node/bin/
npm
install
-g
node-pre-gyp
export
PATH
=
$PATH
:
$
UCOIN
_DIR
/node/lib/node_modules/node-pre-gyp/bin/
export
PATH
=
$PATH
:
$
DUNITER
_DIR
/node/lib/node_modules/node-pre-gyp/bin/
npm
install
export
PATH
=
$PREVIOUS_PATH
return
...
...
@@ -174,7 +174,7 @@ ucoin_do_install() {
local
UCOIN_PROFILE
UCOIN_PROFILE
=
$(
ucoin_detect_profile
)
SOURCE_STR
=
"
\n
export
UCOIN
_DIR=
\"
$
UCOIN
_DIR
\"\n
[ -s
\"\$
UCOIN_DIR/ucoin.sh
\"
] && .
\"\$
UCOIN_DIR/ucoin
.sh
\"
# This loads
ucoin
.sh"
SOURCE_STR
=
"
\n
export
DUNITER
_DIR=
\"
$
DUNITER
_DIR
\"\n
[ -s
\"\$
DUNITER_DIR/duniter.sh
\"
] && .
\"\$
DUNITER_DIR/duniter
.sh
\"
# This loads
duniter
.sh"
if
[
-z
"
$UCOIN_PROFILE
"
]
;
then
echo
"=> Profile not found. Tried
$UCOIN_PROFILE
(as defined in
\$
PROFILE), ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile."
...
...
@@ -185,7 +185,7 @@ ucoin_do_install() {
printf
"
$SOURCE_STR
"
echo
else
if
!
command grep
-qc
'/
ucoin
.sh'
"
$UCOIN_PROFILE
"
;
then
if
!
command grep
-qc
'/
duniter
.sh'
"
$UCOIN_PROFILE
"
;
then
echo
"=> Appending source string to
$UCOIN_PROFILE
"
printf
"
$SOURCE_STR
\n
"
>>
"
$UCOIN_PROFILE
"
else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment