Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Pmodules
buildblocks
Commits
e66234d6
Commit
e66234d6
authored
Jun 15, 2015
by
gsell
Browse files
Merge branch 'master' of gitorious.psi.ch:pmodules/src
parents
66accd02
ab9edd13
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
10 deletions
+19
-10
lib/lib.bash
lib/lib.bash
+5
-1
lib/libpmodules.bash
lib/libpmodules.bash
+11
-6
scripts/Bootstrap/Pmodules/modulecmd.in
scripts/Bootstrap/Pmodules/modulecmd.in
+3
-3
No files found.
lib/lib.bash
View file @
e66234d6
...
...
@@ -77,8 +77,12 @@ die() {
exit
$ec
}
#abspath () {
# (cd "$1" && pwd)
#}
abspath
()
{
(
cd
"
$1
"
&&
pwd
)
readlink
-f
"
$1
"
}
append_path
()
{
...
...
lib/libpmodules.bash
View file @
e66234d6
...
...
@@ -6,21 +6,26 @@ PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
unset
CDPATH
shopt
-s
expand_aliases
declare
-rx
ARGS
=
"
$@
"
declare
-r
BUILDSCRIPT_DIR
=
$(
cd
$(
dirname
"
$0
"
)
&&
pwd
)
declare
-r
BUILDSCRIPT
=
"
${
BUILDSCRIPT_DIR
}
"
/
$(
basename
"
$0
"
)
declare
-rx
ARGS
=
"
$@
"
declare
-rx
SHLIBDIR
=
$(
cd
$(
dirname
"
$BASH_SOURCE
"
)
&&
pwd
)
source
"
${
SHLIBDIR
}
/lib.bash"
declare
-rx
BUILD_BASEDIR
=
$(
abspath
$SHLIBDIR
/..
)
declare
-r
OS
=
$(
uname
-s
)
# number of parallel make jobs
declare
-i
JOBS
=
3
source
"
${
SHLIBDIR
}
/lib.bash"
declare
-rx
BUILD_BASEDIR
=
$(
abspath
$SHLIBDIR
/..
)
source
"
$(
readlink
${
BUILD_BASEDIR
}
/config/environment.bash
)
"
declare
-xr
BUILD_CONFIGDIR
=
"
${
BUILD_BASEDIR
}
/config"
...
...
@@ -29,7 +34,7 @@ declare -xr BUILD_TMPDIR="${BUILD_BASEDIR}/tmp"
declare
-xr
BUILD_DOWNLOADSDIR
=
"
${
BUILD_BASEDIR
}
/Downloads"
declare
-xr
BUILD_VERSIONSFILE
=
"
${
BUILD_CONFIGDIR
}
/versions.conf"
#
source "${BUILD_CONFIGDIR}/Pmodules.conf"
source
"
${
BUILD_CONFIGDIR
}
/Pmodules.conf"
declare
-x
PREFIX
=
''
declare
-x
DOCDIR
=
''
...
...
scripts/Bootstrap/Pmodules/modulecmd.in
View file @
e66234d6
...
...
@@ -1028,7 +1028,7 @@ subcommand_use() {
# ...
# elif is directory
# ...
local
modulfiles_dir
=
"
${
PMODULES_ROOT
}
/
${
arg
}
/
${
PMODULES_MODULEFILES_DIR
}
"
local
modul
e
files_dir
=
"
${
PMODULES_ROOT
}
/
${
arg
}
/
${
PMODULES_MODULEFILES_DIR
}
"
if
[[
${
arg
}
==
-a
]]
||
[[
${
arg
}
==
--append
]]
;
then
subcommand_switches
=
'--append'
elif
[[
${
arg
}
==
-p
]]
||
[[
${
arg
}
==
--prepend
]]
;
then
...
...
@@ -1091,7 +1091,7 @@ subcommand_unuse() {
# ...
# elif is directory
# ...
local
modulfiles_dir
=
"
${
PMODULES_ROOT
}
/
${
arg
}
/
${
PMODULES_MODULEFILES_DIR
}
"
local
modul
e
files_dir
=
"
${
PMODULES_ROOT
}
/
${
arg
}
/
${
PMODULES_MODULEFILES_DIR
}
"
if
is_release
"
${
arg
}
"
;
then
remove_path UsedReleases
"
${
arg
}
"
elif
[[
!
${
arg
}
=
~
*
/
*
]]
&&
[[
-d
${
modulefiles_dir
}
]]
;
then
...
...
@@ -1099,7 +1099,7 @@ subcommand_unuse() {
die 3
"
${
CMD
}
${
0
##_
}
: cannot remove group
${
arg
}
from module path"
fi
remove_path PMODULES_USED_GROUPS
"
${
arg
}
"
dirs_to_remove+
=(
${
modulefiles_dir
}
/
${
arg
}
)
dirs_to_remove+
=(
${
modulefiles_dir
}
)
elif
[[
-d
${
arg
}
]]
;
then
local
normalized_dir
=
$(
cd
"
${
arg
}
"
&&
pwd
)
dirs_to_remove+
=(
${
normalized_dir
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment