update_3rdparty: Add fancy-dmg Makefile

This commit is contained in:
Florian Bruhin 2016-04-06 20:39:24 +02:00
parent ae41a074e8
commit 362837e98c

View File

@ -81,6 +81,18 @@ def update_pdfjs(target_version=None):
urllib.request.urlcleanup()
def update_dmg_makefile():
"""Update fancy-dmg Makefile
See https://el-tramo.be/blog/fancy-dmg/
"""
print("Updating fancy-dmg Makefile...")
url = 'https://raw.githubusercontent.com/remko/fancy-dmg/master/Makefile'
target_path = os.path.join('scripts', 'dev', 'Makefile-dmg')
urllib.request.urlretrieve(url, target_path)
urllib.request.urlcleanup()
def main():
parser = argparse.ArgumentParser()
parser.add_argument(
@ -88,9 +100,14 @@ def main():
help='Specify pdfjs version. If not given, '
'the latest version is used.',
required=False, metavar='VERSION')
parser.add_argument('--fancy-dmg', help="Update fancy-dmg Makefile",
action='store_true')
args = parser.parse_args()
update_pdfjs(args.pdfjs)
if args.fancy_dmg:
update_dmg_makefile()
if __name__ == '__main__':
main()