Bump nuget.exe to v6.6.1
[mono-project.git] / packaging / MacSDK / nuget.py
blob0ef173e52a96e8eb14a7e296bb5e8a794f80f328
1 import fileinput
4 class NuGetBinary (Package):
6 def __init__(self):
7 Package.__init__(self, name='NuGet', version='6.6.1', sources=[
8 'https://dist.nuget.org/win-x86-commandline/v%{version}/nuget.exe'])
10 def build(self):
11 pass
13 def install(self):
14 source = os.path.join(self.workspace, 'nuget.exe')
15 target = os.path.join(self.staged_prefix, 'lib/mono/nuget/nuget.exe')
16 ensure_dir(os.path.dirname(target))
17 shutil.move(source, target)
19 launcher = os.path.join(self.staged_prefix, "bin/nuget")
20 ensure_dir(os.path.dirname(launcher))
21 with open(launcher, "w") as output:
22 output.write("#!/bin/sh\n")
23 output.write(
24 'exec {0}/bin/mono $MONO_OPTIONS {1} "$@"\n'.format(self.staged_prefix, target))
25 os.chmod(launcher, 0o755)
26 NuGetBinary()