added patches for replacing firefox logos

This commit is contained in:
partisan 2024-12-13 12:12:56 +01:00
parent 160cf2a9a6
commit 6a0f36bcf2
43 changed files with 277 additions and 3 deletions

View file

@ -154,8 +154,7 @@ func applyPatch(patchPath, rootPath string) error {
return fmt.Errorf("patch file must specify output (o:) file")
}
if patchType != "new" {
// Replace the original file with the temporary file
if patchType != "new" && patchType != "copy" {
err = os.Rename(inputFilePath, outputFilePath)
if err != nil {
return fmt.Errorf("failed to replace output file: %v", err)
@ -170,6 +169,8 @@ func applyPatch(patchPath, rootPath string) error {
return applyStandardModifications(outputFilePath, modifications)
case "new":
return applyNewModifications(outputFilePath, modifications)
case "copy":
return applyCopyPatch(inputFilePath, outputFilePath)
default:
fmt.Printf("Type not specified defaulting to standard")
return applyStandardModifications(outputFilePath, modifications)