Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
d9af8529
Commit
d9af8529
authored
9 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Obtain tox variables from the main install file
parent
cf16df0e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-mesh-install
+68
-4
68 additions, 4 deletions
src/freedombone-mesh-install
with
68 additions
and
4 deletions
src/freedombone-mesh-install
+
68
−
4
View file @
d9af8529
...
...
@@ -55,10 +55,11 @@ FN=
CHROOT_PREFIX
=
''
FRIENDS_MIRRORS_SERVER
=
TOXID_REPO
=
"https://github.com/bashrc/toxid"
TOX_PORT
=
33445
TOX_REPO
=
"git://github.com/irungentoo/toxcore.git"
TOX_COMMIT
=
'73b2144edcfd1ca617e9054479b66ab0c0361a14'
# To avoid confusions these are obtained from the main project file
TOXID_REPO
=
TOX_PORT
=
TOX_REPO
=
TOX_COMMIT
=
# These are some default nodes, but you can replace them with trusted nodes
# as you prefer. See https://wiki.tox.im/Nodes
TOX_NODES
=
...
...
@@ -418,6 +419,59 @@ function mesh_firewall {
}
function
mesh_tox_node
{
# obtain commits from the main file
if
[
-f
/usr/loca/bin/freedombone
]
;
then
TOX_COMMIT_MAIN
=
$(
cat
/usr/local/bin/freedombone |
grep
"TOX_COMMIT="
|
head
-n
1 |
awk
-F
"'"
'{print $2}'
)
else
TOX_COMMIT_MAIN
=
$(
cat
/usr/bin/freedombone |
grep
"TOX_COMMIT="
|
head
-n
1 |
awk
-F
"'"
'{print $2}'
)
fi
if
[
${#
TOX_COMMIT_MAIN
}
-gt
10
]
;
then
TOX_COMMIT
=
$TOX_COMMIT_MAIN
fi
if
[
!
$TOX_COMMIT
]
;
then
echo
$'No Tox commit was specified'
exit
76325
fi
if
[
-f
/usr/loca/bin/freedombone
]
;
then
TOXID_REPO_MAIN
=
$(
cat
/usr/local/bin/freedombone |
grep
"TOXID_REPO="
|
head
-n
1 |
awk
-F
"'"
'{print $2}'
)
else
TOXID_REPO_MAIN
=
$(
cat
/usr/bin/freedombone |
grep
"TOXID_REPO="
|
head
-n
1 |
awk
-F
"'"
'{print $2}'
)
fi
if
[
${#
TOXID_REPO_MAIN
}
-gt
5
]
;
then
TOXID_REPO
=
$TOXID_REPO_MAIN
fi
if
[
!
$TOXID_REPO
]
;
then
echo
$'No ToxID repo was specified'
exit
78252
fi
if
[
-f
/usr/loca/bin/freedombone
]
;
then
TOX_PORT_MAIN
=
$(
cat
/usr/local/bin/freedombone |
grep
"TOX_PORT="
|
head
-n
1 |
awk
-F
"'"
'{print $2}'
)
else
TOX_PORT_MAIN
=
$(
cat
/usr/bin/freedombone |
grep
"TOX_PORT="
|
head
-n
1 |
awk
-F
"'"
'{print $2}'
)
fi
if
[
${#
TOX_PORT_MAIN
}
-gt
2
]
;
then
TOX_PORT
=
$TOX_PORT_MAIN
fi
if
[
!
$TOX_PORT
]
;
then
echo
$'No Tox port was specified'
exit
32856
fi
if
[
-f
/usr/loca/bin/freedombone
]
;
then
TOX_REPO_MAIN
=
$(
cat
/usr/local/bin/freedombone |
grep
"TOX_REPO="
|
head
-n
1 |
awk
-F
"'"
'{print $2}'
)
else
TOX_REPO_MAIN
=
$(
cat
/usr/bin/freedombone |
grep
"TOX_REPO="
|
head
-n
1 |
awk
-F
"'"
'{print $2}'
)
fi
if
[
${#
TOX_REPO_MAIN
}
-gt
10
]
;
then
TOX_REPO
=
$TOX_REPO_MAIN
fi
if
[
!
$TOX_REPO
]
;
then
echo
$'No Tox repo was specified'
exit
16865
fi
$CHROOT_PREFIX
apt-get
-y
install
build-essential libtool autotools-dev
$CHROOT_PREFIX
apt-get
-y
install
automake checkinstall check git yasm
$CHROOT_PREFIX
apt-get
-y
install
libsodium13 libsodium-dev libcap2-bin
...
...
@@ -507,6 +561,16 @@ function mesh_tox_node {
}
function
mesh_tox_client
{
# obtain commits from the main file
if
[
-f
/usr/loca/bin/freedombone
]
;
then
TOXIC_COMMIT_MAIN
=
$(
cat
/usr/local/bin/freedombone |
grep
"TOXIC_COMMIT="
|
head
-n
1 |
awk
-F
"'"
'{print $2}'
)
else
TOXIC_COMMIT_MAIN
=
$(
cat
/usr/bin/freedombone |
grep
"TOXIC_COMMIT="
|
head
-n
1 |
awk
-F
"'"
'{print $2}'
)
fi
if
[
${#
TOX_COMMIT_MAIN
}
-gt
10
]
;
then
TOXIC_COMMIT
=
$TOXIC_COMMIT_MAIN
fi
$CHROOT_PREFIX
apt-get
-y
install
libncursesw5-dev libconfig-dev libqrencode-dev
$CHROOT_PREFIX
apt-get
-y
install
libcurl4-openssl-dev libvpx-dev libopenal-dev
...
...
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