|
@@ -55,10 +55,11 @@ FN=
|
55
|
55
|
CHROOT_PREFIX=''
|
56
|
56
|
FRIENDS_MIRRORS_SERVER=
|
57
|
57
|
|
58
|
|
-TOXID_REPO="https://github.com/bashrc/toxid"
|
59
|
|
-TOX_PORT=33445
|
60
|
|
-TOX_REPO="git://github.com/irungentoo/toxcore.git"
|
61
|
|
-TOX_COMMIT='73b2144edcfd1ca617e9054479b66ab0c0361a14'
|
|
58
|
+# To avoid confusions these are obtained from the main project file
|
|
59
|
+TOXID_REPO=
|
|
60
|
+TOX_PORT=
|
|
61
|
+TOX_REPO=
|
|
62
|
+TOX_COMMIT=
|
62
|
63
|
# These are some default nodes, but you can replace them with trusted nodes
|
63
|
64
|
# as you prefer. See https://wiki.tox.im/Nodes
|
64
|
65
|
TOX_NODES=
|
|
@@ -418,6 +419,59 @@ function mesh_firewall {
|
418
|
419
|
}
|
419
|
420
|
|
420
|
421
|
function mesh_tox_node {
|
|
422
|
+ # obtain commits from the main file
|
|
423
|
+ if [ -f /usr/loca/bin/freedombone ]; then
|
|
424
|
+ TOX_COMMIT_MAIN=$(cat /usr/local/bin/freedombone | grep "TOX_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
|
|
425
|
+ else
|
|
426
|
+ TOX_COMMIT_MAIN=$(cat /usr/bin/freedombone | grep "TOX_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
|
|
427
|
+ fi
|
|
428
|
+ if [ ${#TOX_COMMIT_MAIN} -gt 10 ]; then
|
|
429
|
+ TOX_COMMIT=$TOX_COMMIT_MAIN
|
|
430
|
+ fi
|
|
431
|
+ if [ ! $TOX_COMMIT ]; then
|
|
432
|
+ echo $'No Tox commit was specified'
|
|
433
|
+ exit 76325
|
|
434
|
+ fi
|
|
435
|
+
|
|
436
|
+ if [ -f /usr/loca/bin/freedombone ]; then
|
|
437
|
+ TOXID_REPO_MAIN=$(cat /usr/local/bin/freedombone | grep "TOXID_REPO=" | head -n 1 | awk -F "'" '{print $2}')
|
|
438
|
+ else
|
|
439
|
+ TOXID_REPO_MAIN=$(cat /usr/bin/freedombone | grep "TOXID_REPO=" | head -n 1 | awk -F "'" '{print $2}')
|
|
440
|
+ fi
|
|
441
|
+ if [ ${#TOXID_REPO_MAIN} -gt 5 ]; then
|
|
442
|
+ TOXID_REPO=$TOXID_REPO_MAIN
|
|
443
|
+ fi
|
|
444
|
+ if [ ! $TOXID_REPO ]; then
|
|
445
|
+ echo $'No ToxID repo was specified'
|
|
446
|
+ exit 78252
|
|
447
|
+ fi
|
|
448
|
+
|
|
449
|
+ if [ -f /usr/loca/bin/freedombone ]; then
|
|
450
|
+ TOX_PORT_MAIN=$(cat /usr/local/bin/freedombone | grep "TOX_PORT=" | head -n 1 | awk -F "'" '{print $2}')
|
|
451
|
+ else
|
|
452
|
+ TOX_PORT_MAIN=$(cat /usr/bin/freedombone | grep "TOX_PORT=" | head -n 1 | awk -F "'" '{print $2}')
|
|
453
|
+ fi
|
|
454
|
+ if [ ${#TOX_PORT_MAIN} -gt 2 ]; then
|
|
455
|
+ TOX_PORT=$TOX_PORT_MAIN
|
|
456
|
+ fi
|
|
457
|
+ if [ ! $TOX_PORT ]; then
|
|
458
|
+ echo $'No Tox port was specified'
|
|
459
|
+ exit 32856
|
|
460
|
+ fi
|
|
461
|
+
|
|
462
|
+ if [ -f /usr/loca/bin/freedombone ]; then
|
|
463
|
+ TOX_REPO_MAIN=$(cat /usr/local/bin/freedombone | grep "TOX_REPO=" | head -n 1 | awk -F "'" '{print $2}')
|
|
464
|
+ else
|
|
465
|
+ TOX_REPO_MAIN=$(cat /usr/bin/freedombone | grep "TOX_REPO=" | head -n 1 | awk -F "'" '{print $2}')
|
|
466
|
+ fi
|
|
467
|
+ if [ ${#TOX_REPO_MAIN} -gt 10 ]; then
|
|
468
|
+ TOX_REPO=$TOX_REPO_MAIN
|
|
469
|
+ fi
|
|
470
|
+ if [ ! $TOX_REPO ]; then
|
|
471
|
+ echo $'No Tox repo was specified'
|
|
472
|
+ exit 16865
|
|
473
|
+ fi
|
|
474
|
+
|
421
|
475
|
$CHROOT_PREFIX apt-get -y install build-essential libtool autotools-dev
|
422
|
476
|
$CHROOT_PREFIX apt-get -y install automake checkinstall check git yasm
|
423
|
477
|
$CHROOT_PREFIX apt-get -y install libsodium13 libsodium-dev libcap2-bin
|
|
@@ -507,6 +561,16 @@ function mesh_tox_node {
|
507
|
561
|
}
|
508
|
562
|
|
509
|
563
|
function mesh_tox_client {
|
|
564
|
+ # obtain commits from the main file
|
|
565
|
+ if [ -f /usr/loca/bin/freedombone ]; then
|
|
566
|
+ TOXIC_COMMIT_MAIN=$(cat /usr/local/bin/freedombone | grep "TOXIC_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
|
|
567
|
+ else
|
|
568
|
+ TOXIC_COMMIT_MAIN=$(cat /usr/bin/freedombone | grep "TOXIC_COMMIT=" | head -n 1 | awk -F "'" '{print $2}')
|
|
569
|
+ fi
|
|
570
|
+ if [ ${#TOX_COMMIT_MAIN} -gt 10 ]; then
|
|
571
|
+ TOXIC_COMMIT=$TOXIC_COMMIT_MAIN
|
|
572
|
+ fi
|
|
573
|
+
|
510
|
574
|
$CHROOT_PREFIX apt-get -y install libncursesw5-dev libconfig-dev libqrencode-dev
|
511
|
575
|
$CHROOT_PREFIX apt-get -y install libcurl4-openssl-dev libvpx-dev libopenal-dev
|
512
|
576
|
|