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,11 +64,10 @@ if [ -d "/var/packages/CodecPack" ]; then
echo -e "AME Patch: Downloading Codec!" echo -e "AME Patch: Downloading Codec!"
if "$cp_usr_path/bin/synoame-bin-auto-install-needed-codec"; then if "$cp_usr_path/bin/synoame-bin-auto-install-needed-codec"; then
echo -e "AME Patch: Successful!" echo -e "AME Patch: Successful!"
else exit 0
echo -e "AME Patch: Unsuccessful!"
exit 1
fi fi
else fi
echo -e "AME Patch: Unsuccessful!"
if [ -f "$so_backup" ]; then if [ -f "$so_backup" ]; then
mv -f "$so_backup" "$so" mv -f "$so_backup" "$so"
fi fi
@ -78,8 +77,7 @@ if [ -d "/var/packages/CodecPack" ]; then
if [ -f "$licsig_backup" ]; then if [ -f "$licsig_backup" ]; then
mv -f "$licsig_backup" "$licsig" mv -f "$licsig_backup" "$licsig"
fi fi
echo -e "AME Patch: Unsuccessful!" echo -e "AME Patch: Backup restored!"
exit 1 exit 1
fi
fi fi
exit 0 exit 0