|
@@ -32,63 +32,63 @@ TOMB_REPO="https://github.com/dyne/Tomb"
|
32
|
32
|
TOMB_COMMIT='c80ebd6d6ed77980eb5b559757e03ea13a29bdd1'
|
33
|
33
|
|
34
|
34
|
function mesh_install_tomb {
|
35
|
|
- chroot ${rootdir} apt-get -y install cryptsetup zsh pinentry-curses
|
|
35
|
+ chroot ${rootdir} apt-get -y install cryptsetup zsh pinentry-curses
|
36
|
36
|
|
37
|
|
- if [ ! -d ${rootdir}/$INSTALL_DIR ]; then
|
38
|
|
- mkdir -p ${rootdir}/$INSTALL_DIR
|
39
|
|
- fi
|
|
37
|
+ if [ ! -d ${rootdir}/$INSTALL_DIR ]; then
|
|
38
|
+ mkdir -p ${rootdir}/$INSTALL_DIR
|
|
39
|
+ fi
|
40
|
40
|
|
41
|
|
- git_clone $TOMB_REPO ${rootdir}/$INSTALL_DIR/tomb
|
42
|
|
- cd ${rootdir}/$INSTALL_DIR/tomb
|
|
41
|
+ git_clone $TOMB_REPO ${rootdir}/$INSTALL_DIR/tomb
|
|
42
|
+ cd ${rootdir}/$INSTALL_DIR/tomb
|
43
|
43
|
|
44
|
|
- git checkout $TOMB_COMMIT -b $TOMB_COMMIT
|
|
44
|
+ git checkout $TOMB_COMMIT -b $TOMB_COMMIT
|
45
|
45
|
|
46
|
|
- chroot ${rootdir} /bin/bash -x <<EOF
|
|
46
|
+ chroot ${rootdir} /bin/bash -x <<EOF
|
47
|
47
|
cd $INSTALL_DIR/tomb
|
48
|
48
|
make install
|
49
|
49
|
EOF
|
50
|
|
- if [ ! -f ${rootdir}/usr/local/bin/tomb ]; then
|
51
|
|
- exit 93462
|
52
|
|
- fi
|
|
50
|
+ if [ ! -f ${rootdir}/usr/local/bin/tomb ]; then
|
|
51
|
+ exit 93462
|
|
52
|
+ fi
|
53
|
53
|
}
|
54
|
54
|
|
55
|
55
|
function install_tomb {
|
56
|
|
- if [ $INSTALLING_MESH ]; then
|
57
|
|
- mesh_install_tomb
|
58
|
|
- return
|
59
|
|
- fi
|
60
|
|
-
|
61
|
|
- function_check set_repo_commit
|
62
|
|
- set_repo_commit $INSTALL_DIR/tomb "Tomb commit" "$TOMB_COMMIT" $TOMB_REPO
|
63
|
|
-
|
64
|
|
- if [ -f $COMPLETION_FILE ]; then
|
65
|
|
- if grep -Fxq "install_tomb" $COMPLETION_FILE; then
|
66
|
|
- return
|
67
|
|
- fi
|
68
|
|
- fi
|
69
|
|
-
|
70
|
|
- apt-get -y install cryptsetup zsh pinentry-curses
|
71
|
|
-
|
72
|
|
- if [ ! -d $INSTALL_DIR ]; then
|
73
|
|
- mkdir -p $INSTALL_DIR
|
74
|
|
- fi
|
75
|
|
-
|
76
|
|
- git_clone $TOMB_REPO $INSTALL_DIR/tomb
|
77
|
|
- cd $INSTALL_DIR/tomb
|
78
|
|
-
|
79
|
|
- git checkout $TOMB_COMMIT -b $TOMB_COMMIT
|
80
|
|
- if ! grep -q "Tomb commit" $COMPLETION_FILE; then
|
81
|
|
- echo "Tomb commit:$TOMB_COMMIT" >> $COMPLETION_FILE
|
82
|
|
- else
|
83
|
|
- sed -i "s/Tomb commit.*/Tomb commit:$TOMB_COMMIT/g" $COMPLETION_FILE
|
84
|
|
- fi
|
85
|
|
-
|
86
|
|
- make install
|
87
|
|
- if [ ! -f /usr/local/bin/tomb ]; then
|
88
|
|
- exit 93462
|
89
|
|
- fi
|
90
|
|
-
|
91
|
|
- echo 'install_tomb' >> $COMPLETION_FILE
|
|
56
|
+ if [ $INSTALLING_MESH ]; then
|
|
57
|
+ mesh_install_tomb
|
|
58
|
+ return
|
|
59
|
+ fi
|
|
60
|
+
|
|
61
|
+ function_check set_repo_commit
|
|
62
|
+ set_repo_commit $INSTALL_DIR/tomb "tomb commit" "$TOMB_COMMIT" $TOMB_REPO
|
|
63
|
+
|
|
64
|
+ if [ -f $COMPLETION_FILE ]; then
|
|
65
|
+ if grep -Fxq "install_tomb" $COMPLETION_FILE; then
|
|
66
|
+ return
|
|
67
|
+ fi
|
|
68
|
+ fi
|
|
69
|
+
|
|
70
|
+ apt-get -y install cryptsetup zsh pinentry-curses
|
|
71
|
+
|
|
72
|
+ if [ ! -d $INSTALL_DIR ]; then
|
|
73
|
+ mkdir -p $INSTALL_DIR
|
|
74
|
+ fi
|
|
75
|
+
|
|
76
|
+ git_clone $TOMB_REPO $INSTALL_DIR/tomb
|
|
77
|
+ cd $INSTALL_DIR/tomb
|
|
78
|
+
|
|
79
|
+ git checkout $TOMB_COMMIT -b $TOMB_COMMIT
|
|
80
|
+ if ! grep -q "tomb commit" $COMPLETION_FILE; then
|
|
81
|
+ echo "tomb commit:$TOMB_COMMIT" >> $COMPLETION_FILE
|
|
82
|
+ else
|
|
83
|
+ sed -i "s/tomb commit.*/tomb commit:$TOMB_COMMIT/g" $COMPLETION_FILE
|
|
84
|
+ fi
|
|
85
|
+
|
|
86
|
+ make install
|
|
87
|
+ if [ ! -f /usr/local/bin/tomb ]; then
|
|
88
|
+ exit 93462
|
|
89
|
+ fi
|
|
90
|
+
|
|
91
|
+ echo 'install_tomb' >> $COMPLETION_FILE
|
92
|
92
|
}
|
93
|
93
|
|
94
|
94
|
# NOTE: deliberately no exit 0
|