diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2023-12-06 12:09:30 +0100 |
---|---|---|
committer | Alexis Hildebrandt <afh@surryhill.net> | 2023-12-06 12:09:30 +0100 |
commit | e39d148af75225b0d46cc63f15bad853a7a5ce6a (patch) | |
tree | 22a44039c337c62920264deca648b8e0dbb43c05 | |
parent | d6d46e41f570dacb09a9f4ae8a208fb3afb34d37 (diff) | |
download | fork-ledger-e39d148af75225b0d46cc63f15bad853a7a5ce6a.tar.gz fork-ledger-e39d148af75225b0d46cc63f15bad853a7a5ce6a.tar.bz2 fork-ledger-e39d148af75225b0d46cc63f15bad853a7a5ce6a.zip |
acprep: Replace hardcoded paths with shutil.which
-rwxr-xr-x | acprep | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -485,7 +485,7 @@ class PrepareBuild(CommandLineApp): system = os.uname().sysname if system == 'Darwin': - if exists('/opt/local/bin/port'): + if shutil.which('port'): self.log.info('Looks like you are using MacPorts on macOS') packages = [ 'sudo', 'port', 'install', '-f', @@ -502,7 +502,7 @@ class PrepareBuild(CommandLineApp): ] + BoostInfo().dependencies('darwin-macports') self.log.info('Executing: ' + ' '.join(packages)) self.execute(*packages) - elif exists('/usr/local/bin/brew') or exists('/opt/local/bin/brew'): + elif shutil.which('brew'): self.log.info('Looks like you are using Homebrew on macOS') packages = [ 'brew', 'install', @@ -511,7 +511,7 @@ class PrepareBuild(CommandLineApp): ] + BoostInfo().dependencies('darwin-homebrew') self.log.info('Executing: ' + ' '.join(packages)) self.execute(*packages) - elif exists('/sw/bin/fink'): + elif shutil.which('fink'): self.log.info('Looks like you are using Fink on macOS') self.log.error("I don't know the package names for Fink yet!") sys.exit(1) |