summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2023-12-06 12:09:30 +0100
committerAlexis Hildebrandt <afh@surryhill.net>2023-12-06 12:09:30 +0100
commite39d148af75225b0d46cc63f15bad853a7a5ce6a (patch)
tree22a44039c337c62920264deca648b8e0dbb43c05
parentd6d46e41f570dacb09a9f4ae8a208fb3afb34d37 (diff)
downloadfork-ledger-e39d148af75225b0d46cc63f15bad853a7a5ce6a.tar.gz
fork-ledger-e39d148af75225b0d46cc63f15bad853a7a5ce6a.tar.bz2
fork-ledger-e39d148af75225b0d46cc63f15bad853a7a5ce6a.zip
acprep: Replace hardcoded paths with shutil.which
-rwxr-xr-xacprep6
1 files changed, 3 insertions, 3 deletions
diff --git a/acprep b/acprep
index f33a0d29..1ebc0ef2 100755
--- a/acprep
+++ b/acprep
@@ -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)