From 130b62f141e44b8e93d7d1eb4b1fb2e6acb3ceb2 Mon Sep 17 00:00:00 2001 From: H3o66 Date: Mon, 10 Apr 2023 16:05:48 +0200 Subject: [PATCH] regression(update): add migration for pmc update --- lgsm/modules/update_papermc.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lgsm/modules/update_papermc.sh b/lgsm/modules/update_papermc.sh index b7bdee8fd..9a626f5e2 100644 --- a/lgsm/modules/update_papermc.sh +++ b/lgsm/modules/update_papermc.sh @@ -181,6 +181,20 @@ elif [ "${shortname}" == "wmc" ]; then paperproject="waterfall" fi +# migration from old build file to new in the install dir +oldbuildfile="${datadir}/${paperproject}-version" +if [ -f "${oldbuildfile}" ]; then + if [ -f "${serverfiles}/build.txt" ]; then + fn_print_info_nl "Remove old build version file" + fn_script_log_info "Remove old build version file" + rm -f "${oldbuildfile}" + else + fn_print_info_nl "Move old build file to new place" + fn_script_log_info "Move old build file to new place" + mv -f -v "${oldbuildfile}" "${serverfiles}/build.txt" + fi +fi + if [ "${firstcommandname}" == "INSTALL" ]; then fn_update_remotebuild fn_update_dl