mirror of
https://github.com/datarhei/core.git
synced 2025-09-27 04:16:25 +08:00
Add test if import and migrate script exist
This commit is contained in:
14
run.sh
14
run.sh
@@ -3,20 +3,24 @@
|
|||||||
# First run the import program. It will read the db.dir from the config file in order to
|
# First run the import program. It will read the db.dir from the config file in order to
|
||||||
# find an old v1.json. This will be converted to the new db format.
|
# find an old v1.json. This will be converted to the new db format.
|
||||||
|
|
||||||
./bin/import
|
if [ -x ./bin/import ]; then
|
||||||
if [ $? -ne 0 ]; then
|
./bin/import
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run the FFmpeg migration program. In case a FFmpeg 5 binary is present, it will create a
|
# Run the FFmpeg migration program. In case a FFmpeg 5 binary is present, it will create a
|
||||||
# backup of the current DB and modify the FFmpeg parameter such that they are compatible
|
# backup of the current DB and modify the FFmpeg parameter such that they are compatible
|
||||||
# with FFmpeg 5.
|
# with FFmpeg 5.
|
||||||
|
|
||||||
./bin/ffmigrate
|
if [ -x ./bin/ffmigrate ]; then
|
||||||
if [ $? -ne 0 ]; then
|
./bin/ffmigrate
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Now run the core with the possibly converted configuration.
|
# Now run the core with the possibly converted configuration.
|
||||||
|
|
||||||
./bin/core
|
exec ./bin/core
|
||||||
|
Reference in New Issue
Block a user