File tree Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ cameras.sql
3
3
.settings
4
4
* .swp
5
5
target
6
+ prep.config
Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /bin/bash -x
2
2
#
3
3
# This file is part of Moonfire NVR, a security camera network video recorder.
4
4
# Copyright (C) 2016 Scott Lamb <[email protected] >
39
39
#
40
40
41
41
# Configuration variables. Should only need minimal, or zero, changes.
42
- # Empty values will use defaults.
42
+ # Empty values will use defaults. For convenience, we attempt to read
43
+ # customizations from prep.config first
43
44
#
45
+ if [ -r prep.config ]; then
46
+ . prep.config
47
+ fi
44
48
45
49
# User and group
46
50
# Default: or whatever is in $NVR_USER (default "moonfire-nvr")
61
65
62
66
# Set to mountpoint of media directory, empty to stay in home directory
63
67
# Default: empty
64
- # SAMPLES_DIR=
68
+ # SAMPLES_DIR=/media/nvr/samples
65
69
66
70
# Set to path for media directory relative to mountpoint
67
71
# Default: "samples"
@@ -154,8 +158,18 @@ if [ ! -x "${SERVICE_BIN}" ]; then
154
158
echo
155
159
exit 1
156
160
fi
157
- RUST_TEST_THREADS=1 cargo test
158
- cargo build --release
161
+ if ! RUST_TEST_THREADS=1 cargo test ; then
162
+ echo " test failed. Try to run the following manually for more info"
163
+ echo " RUST_TEST_THREADS=1 cargo test --verbose"
164
+ echo
165
+ exit 1
166
+ fi
167
+ if ! cargo build --release; then
168
+ echo " Build failed."
169
+ echo " RUST_TEST_THREADS=1 cargo build --release --verbose"
170
+ echo
171
+ exit 1
172
+ fi
159
173
sudo install -m 755 target/release/moonfire-nvr ${SERVICE_BIN}
160
174
if [ -x " ${SERVICE_BIN} " ]; then
161
175
echo " Binary installed..." ; echo
You can’t perform that action at this time.
0 commit comments