summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-12-25 16:35:55 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2015-12-25 16:35:55 -0800
commitc65fd3a28968f549eed361d85f715caa4f8f6436 (patch)
treed058a307946c8bf5445f4d0cb8ac31a8819329c4 /share
parent34401cf0c3ee019fd6b8fb739e2a511c6de0870c (diff)
parent28d61f0d7f1569e643fd79fa9c31c21c2e6ec4e4 (diff)
downloadspack-c65fd3a28968f549eed361d85f715caa4f8f6436.tar.gz
spack-c65fd3a28968f549eed361d85f715caa4f8f6436.tar.bz2
spack-c65fd3a28968f549eed361d85f715caa4f8f6436.tar.xz
spack-c65fd3a28968f549eed361d85f715caa4f8f6436.zip
Merge branch 'develop' into mplegendre-multi_pkgsrc_roots
Conflicts: lib/spack/spack/cmd/create.py lib/spack/spack/cmd/extensions.py lib/spack/spack/cmd/fetch.py lib/spack/spack/cmd/uninstall.py lib/spack/spack/config.py lib/spack/spack/database.py lib/spack/spack/directory_layout.py lib/spack/spack/packages.py lib/spack/spack/spec.py
Diffstat (limited to 'share')
-rw-r--r--share/spack/csh/spack.csh2
-rwxr-xr-xshare/spack/setup-env.csh2
-rwxr-xr-xshare/spack/setup-env.sh18
3 files changed, 14 insertions, 8 deletions
diff --git a/share/spack/csh/spack.csh b/share/spack/csh/spack.csh
index b21da23836..d64ce8935b 100644
--- a/share/spack/csh/spack.csh
+++ b/share/spack/csh/spack.csh
@@ -101,7 +101,7 @@ case unload:
breaksw
default:
- \spack $_sp_args
+ \spack $_sp_flags $_sp_args
breaksw
endsw
diff --git a/share/spack/setup-env.csh b/share/spack/setup-env.csh
index 5f91670a60..42d8c42726 100755
--- a/share/spack/setup-env.csh
+++ b/share/spack/setup-env.csh
@@ -6,7 +6,7 @@
# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
-# For details, see https://scalability-llnl.github.io/spack
+# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh
index b90846d28f..47202f6087 100755
--- a/share/spack/setup-env.sh
+++ b/share/spack/setup-env.sh
@@ -6,7 +6,7 @@
# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
-# For details, see https://scalability-llnl.github.io/spack
+# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
@@ -56,6 +56,12 @@
# spack dotfiles.
########################################################################
function spack {
+ # save raw arguments into an array before butchering them
+ args=()
+ for a in "$@"; do
+ # yup, this is awful, blame bash2 compat
+ args=("${args[@]}" "$a")
+ done
# accumulate initial flags for main spack command
_sp_flags=""
while [[ "$1" =~ ^- ]]; do
@@ -116,7 +122,7 @@ function spack {
esac
;;
*)
- command spack $_sp_flags $_sp_subcommand $_sp_spec
+ command spack "${args[@]}"
;;
esac
}
@@ -167,8 +173,8 @@ fi
#
_sp_share_dir=$(cd "$(dirname $_sp_source_file)" && pwd)
_sp_prefix=$(cd "$(dirname $(dirname $_sp_share_dir))" && pwd)
+_spack_pathadd PATH "${_sp_prefix%/}/bin"
-# TODO: fix SYS_TYPE to something non-LLNL-specific
-_spack_pathadd DK_NODE "$_sp_share_dir/dotkit/$SYS_TYPE"
-_spack_pathadd MODULEPATH "$_sp_share_dir/modules/$SYS_TYPE"
-_spack_pathadd PATH "$_sp_prefix/bin"
+_sp_sys_type=$(spack-python -c 'print(spack.architecture.sys_type())')
+_spack_pathadd DK_NODE "${_sp_share_dir%/}/dotkit/$_sp_sys_type"
+_spack_pathadd MODULEPATH "${_sp_share_dir%/}/modules/$_sp_sys_type"