Use cleaner mech to install script

Use @adamjstewart's nicer bit of python code in the
install method.
This commit is contained in:
George Hartzell 2016-07-25 17:50:06 -04:00
parent 63121a0c49
commit 6c3623422f

View File

@ -48,10 +48,6 @@ def unpack(self):
def install(self, spec, prefix):
mkdirp(prefix.bin)
# find the file named like ack-2.14-single-file in a version
# independent manner (there should be only one )and install it
# as `ack`.
for f in os.listdir('.'):
if re.match('ack-\d*\.\d*-single-file', f):
install(f, join_path(prefix.bin, "ack"))
set_executable(join_path(prefix.bin, "ack"))
ack = 'ack-{0}-single-file'.format(self.version)
install(ack, join_path(prefix.bin, "ack"))
set_executable(join_path(prefix.bin, "ack"))