forked from distok/cutthecord
		
	necessary: add script to get us some extra function space
also adjusting ctcci and patchport to account for this sort of versioned scripts
This commit is contained in:
		
							parent
							
								
									9f5058ed0c
								
							
						
					
					
						commit
						5569efefa0
					
				
					 3 changed files with 19 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -205,6 +205,13 @@ for patch_name in PATCHES:
 | 
			
		|||
                                         "font", font))
 | 
			
		||||
    # Apply any other patches
 | 
			
		||||
    else:
 | 
			
		||||
        patch_script = os.path.join(REPO_FOLDER, "patches",
 | 
			
		||||
                                    patch_name, f"{VERSION}.sh")
 | 
			
		||||
        if os.path.exists(patch_script):
 | 
			
		||||
            subprocess.run(f"bash {patch_script}",
 | 
			
		||||
                           shell=True,
 | 
			
		||||
                           cwd=WORK_APK_PATH)
 | 
			
		||||
 | 
			
		||||
        patch(patch_file, WORK_APK_PATH, patch_name)
 | 
			
		||||
 | 
			
		||||
# Pack the APK
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								patches/necessary/968.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										2
									
								
								patches/necessary/968.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,2 @@
 | 
			
		|||
#!/bin/bash
 | 
			
		||||
mv smali/com/crashlytics smali_classes2/com/
 | 
			
		||||
							
								
								
									
										10
									
								
								patchport.py
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								patchport.py
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -130,6 +130,16 @@ for patch in os.listdir(os.path.join(cutthecord_folder, "patches")):
 | 
			
		|||
                            f"{to_versioncode}.patch")
 | 
			
		||||
    readme_path = os.path.join(cutthecord_folder, "patches", patch, "README.md")
 | 
			
		||||
 | 
			
		||||
    # Handle copying of versioned scripts, untested and dirty!
 | 
			
		||||
    script_path = os.path.join(cutthecord_folder, "patches", patch,
 | 
			
		||||
                               f"{from_versioncode}.sh")
 | 
			
		||||
    if os.path.exists(script_path):
 | 
			
		||||
        script_out_path = os.path.join(cutthecord_folder, "patches", patch,
 | 
			
		||||
                                       f"{to_versioncode}.sh")
 | 
			
		||||
        with open(script_path) as f:
 | 
			
		||||
            with open(script_out_path, "w") as f2:
 | 
			
		||||
                f2.write(f.read())
 | 
			
		||||
 | 
			
		||||
    # Check if patch exists for from_version, if it doesn't, warn user
 | 
			
		||||
    if not os.path.isfile(patch_path) and patch not in ["necessary"]:
 | 
			
		||||
        # Don't warn on instructional patches
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue