Skip to content

Commit 0747de2

Browse files
committed
Add test if import and migrate script exist
1 parent cfff53b commit 0747de2

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

run.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,24 @@
33
# First run the import program. It will read the db.dir from the config file in order to
44
# find an old v1.json. This will be converted to the new db format.
55

6-
./bin/import
7-
if [ $? -ne 0 ]; then
8-
exit 1
6+
if [ -x ./bin/import ]; then
7+
./bin/import
8+
if [ $? -ne 0 ]; then
9+
exit 1
10+
fi
911
fi
1012

1113
# Run the FFmpeg migration program. In case a FFmpeg 5 binary is present, it will create a
1214
# backup of the current DB and modify the FFmpeg parameter such that they are compatible
1315
# with FFmpeg 5.
1416

15-
./bin/ffmigrate
16-
if [ $? -ne 0 ]; then
17-
exit 1
17+
if [ -x ./bin/ffmigrate ]; then
18+
./bin/ffmigrate
19+
if [ $? -ne 0 ]; then
20+
exit 1
21+
fi
1822
fi
1923

2024
# Now run the core with the possibly converted configuration.
2125

22-
./bin/core
26+
exec ./bin/core

0 commit comments

Comments
 (0)