summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/fpm/package.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/fpm/package.py b/var/spack/repos/builtin/packages/fpm/package.py
index d13b4a2c45..e2784ea726 100644
--- a/var/spack/repos/builtin/packages/fpm/package.py
+++ b/var/spack/repos/builtin/packages/fpm/package.py
@@ -3,6 +3,9 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+import stat
+
from spack import *
@@ -52,7 +55,12 @@ class Fpm(Package):
This functionality is provided by the ``install.sh`` script.
"""
- script = Executable("./install.sh")
+ # Perform `chmod +x ./install.sh`
+ script_path = './install.sh'
+ st = os.stat(script_path)
+ os.chmod(script_path, st.st_mode | stat.S_IXUSR)
+
+ script = Executable(script_path)
script(*self.install_args())
def install_args(self):