Skip to content

Commit

Permalink
Merge pull request #3 from Cubiss/py
Browse files Browse the repository at this point in the history
Fix bug: take only base name of a zip file when full path is supplied
  • Loading branch information
yshalsager committed May 17, 2019
2 parents 6b9510c + 11071ee commit 359f025
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions create_flashable_firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ def vendor_updater():

def make_zip():
rom, process = arg_parse()
rom = path.basename(rom)
with open("out/META-INF/com/google/android/updater-script", 'r') as i:
codename = str(i.readlines()[7].split('/', 3)[2]).split(':', 1)[0].replace('_', '-')
print("Creating " + process + " zip from " + rom + " for " + codename)
Expand Down Expand Up @@ -214,5 +215,6 @@ def main():
make_zip()


arg_parse()
main()
if __name__ == '__main__':
arg_parse()
main()

0 comments on commit 359f025

Please sign in to comment.