Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- device = 'a,b,c'
- cmd = ('(' +
- ' || \0'.join(['getprop("ro.product.device") == "%s" || getprop("ro.build.product") == "%s"'
- % (i, i) for i in device.split(",")]) +
- ') || abort("This package is for \\"%s\\" devices\n'
- 'this is a \\"" + getprop("ro.product.device") + "\\".");'
- ) % (device)
- print(cmd)
- OUTPUT
- (getprop("ro.product.device") == "a" || getprop("ro.build.product") == "a" || getprop("ro.product.device") == "b" || getprop("ro.build.product") == "b" || getprop("ro.product.device") == "c" || getprop("ro.build.product") == "c") || abort("This package is for \"a,b,c\" devices
- this is a \"" + getprop("ro.product.device") + "\".")
Advertisement
Add Comment
Please, Sign In to add comment