From 0747de2d98fff03f720259f579514ee3647f775d Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Thu, 4 Apr 2024 11:10:10 +0200 Subject: [PATCH] Add test if import and migrate script exist --- run.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/run.sh b/run.sh index 9dce22ee..b80df844 100755 --- a/run.sh +++ b/run.sh @@ -3,20 +3,24 @@ # 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. -./bin/import -if [ $? -ne 0 ]; then - exit 1 +if [ -x ./bin/import ]; then + ./bin/import + if [ $? -ne 0 ]; then + exit 1 + fi fi # 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 # with FFmpeg 5. -./bin/ffmigrate -if [ $? -ne 0 ]; then - exit 1 +if [ -x ./bin/ffmigrate ]; then + ./bin/ffmigrate + if [ $? -ne 0 ]; then + exit 1 + fi fi # Now run the core with the possibly converted configuration. -./bin/core +exec ./bin/core