amepatch: rework logic

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-07-06 20:30:50 +02:00
parent 557cdf191a
commit 6f1085d16d

View File

@ -64,22 +64,20 @@ if [ -d "/var/packages/CodecPack" ]; then
echo -e "AME Patch: Downloading Codec!"
if "$cp_usr_path/bin/synoame-bin-auto-install-needed-codec"; then
echo -e "AME Patch: Successful!"
else
echo -e "AME Patch: Unsuccessful!"
exit 1
exit 0
fi
else
if [ -f "$so_backup" ]; then
mv -f "$so_backup" "$so"
fi
if [ -f "$lic_backup" ]; then
mv -f "$lic_backup" "$lic"
fi
if [ -f "$licsig_backup" ]; then
mv -f "$licsig_backup" "$licsig"
fi
echo -e "AME Patch: Unsuccessful!"
exit 1
fi
echo -e "AME Patch: Unsuccessful!"
if [ -f "$so_backup" ]; then
mv -f "$so_backup" "$so"
fi
if [ -f "$lic_backup" ]; then
mv -f "$lic_backup" "$lic"
fi
if [ -f "$licsig_backup" ]; then
mv -f "$licsig_backup" "$licsig"
fi
echo -e "AME Patch: Backup restored!"
exit 1
fi
exit 0