|
@@ -0,0 +1,66 @@
|
|
1
|
+#!/bin/bash
|
|
2
|
+#
|
|
3
|
+# .---. . .
|
|
4
|
+# | | |
|
|
5
|
+# |--- .--. .-. .-. .-.| .-. .--.--. |.-. .-. .--. .-.
|
|
6
|
+# | | (.-' (.-' ( | ( )| | | | )( )| | (.-'
|
|
7
|
+# ' ' --' --' -' - -' ' ' -' -' -' ' - --'
|
|
8
|
+#
|
|
9
|
+# Freedom in the Cloud
|
|
10
|
+#
|
|
11
|
+# Filesystem encryption, etc
|
|
12
|
+#
|
|
13
|
+# License
|
|
14
|
+# =======
|
|
15
|
+#
|
|
16
|
+# Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to>
|
|
17
|
+#
|
|
18
|
+# This program is free software: you can redistribute it and/or modify
|
|
19
|
+# it under the terms of the GNU Affero General Public License as published by
|
|
20
|
+# the Free Software Foundation, either version 3 of the License, or
|
|
21
|
+# (at your option) any later version.
|
|
22
|
+#
|
|
23
|
+# This program is distributed in the hope that it will be useful,
|
|
24
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
25
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
26
|
+# GNU Affero General Public License for more details.
|
|
27
|
+#
|
|
28
|
+# You should have received a copy of the GNU Affero General Public License
|
|
29
|
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
30
|
+
|
|
31
|
+TOMB_REPO="https://github.com/dyne/Tomb"
|
|
32
|
+TOMB_COMMIT='c80ebd6d6ed77980eb5b559757e03ea13a29bdd1'
|
|
33
|
+
|
|
34
|
+function install_tomb {
|
|
35
|
+ function_check set_repo_commit
|
|
36
|
+ set_repo_commit $INSTALL_DIR/tomb "Tomb commit" "$TOMB_COMMIT" $TOMB_REPO
|
|
37
|
+
|
|
38
|
+ if [ -f $COMPLETION_FILE ]; then
|
|
39
|
+ if grep -Fxq "install_tomb" $COMPLETION_FILE; then
|
|
40
|
+ return
|
|
41
|
+ fi
|
|
42
|
+ fi
|
|
43
|
+
|
|
44
|
+ apt-get -y install cryptsetup zsh
|
|
45
|
+
|
|
46
|
+ if [ ! -d $INSTALL_DIR ]; then
|
|
47
|
+ mkdir -p $INSTALL_DIR
|
|
48
|
+ fi
|
|
49
|
+ cd $INSTALL_DIR
|
|
50
|
+
|
|
51
|
+ git_clone $TOMB_REPO tomb
|
|
52
|
+ cd $INSTALL_DIR/tomb
|
|
53
|
+
|
|
54
|
+ git checkout $TOMB_COMMIT -b $TOMB_COMMIT
|
|
55
|
+ if ! grep -q "Tomb commit" $COMPLETION_FILE; then
|
|
56
|
+ echo "Tomb commit:$TOMB_COMMIT" >> $COMPLETION_FILE
|
|
57
|
+ else
|
|
58
|
+ sed -i "s/Tomb commit.*/Tomb commit:$TOMB_COMMIT/g" $COMPLETION_FILE
|
|
59
|
+ fi
|
|
60
|
+
|
|
61
|
+ make install
|
|
62
|
+
|
|
63
|
+ echo 'install_tomb' >> $COMPLETION_FILE
|
|
64
|
+}
|
|
65
|
+
|
|
66
|
+# NOTE: deliberately no exit 0
|