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
fee09479
Commit
fee09479
authored
Jul 09, 2015
by
gsell
Browse files
scripts/Bootstrap/compile_pmodules.sh
- adapted to new format of Pmodules_version.conf - conditional compiling
parent
49cb1999
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
11 deletions
+40
-11
scripts/Bootstrap/compile_pmodules.sh
scripts/Bootstrap/compile_pmodules.sh
+40
-11
No files found.
scripts/Bootstrap/compile_pmodules.sh
View file @
fee09479
...
...
@@ -3,22 +3,51 @@
declare
-r
BASE_DIR
=
$(
cd
"
$(
dirname
$0
)
/../.."
&&
pwd
)
declare
-r
BOOTSTRAP_DIR
=
"
${
BASE_DIR
}
/scripts/Bootstrap"
source
"
${
BOOTSTRAP_DIR
}
/Pmodules_version.conf"
source
"
${
BASE_DIR
}
/lib/lib.bash"
read_versions
"
${
BOOTSTRAP_DIR
}
/Pmodules_version.conf"
unset
PMODULES_HOME
source
"/opt/psi/config/environment.bash"
if
[[
-n
${
PMODULES_DIR
}
]]
&&
[[
"
${
PMODULES_DIR
}
"
!=
"/"
]]
&&
[[
-d
"
${
PMODULES_DIR
}
"
]]
;
then
rm
-rf
"
${
PMODULES_DIR
}
"
#if [[ -n ${PMODULES_DIR} ]] && [[ "${PMODULES_DIR}" != "/" ]] && [[ -d "${PMODULES_DIR}" ]]; then
# rm -rf "${PMODULES_DIR}"
#fi
build
()
{
local
-r
name
=
"
$1
"
local
-r
version
=
"
$2
"
"
${
BOOTSTRAP_DIR
}
/
${
name
}
/build"
--bootstrap
--disable-cleanup
"
${
version
}
"
||
\
die 3
"Compiling '
${
name
}
' failed!"
}
if
[[
!
-f
"
${
PMODULES_HOME
}
/bin/base64"
]]
;
then
build coreutils
"
${
COREUTILS_VERSION
}
"
fi
if
[[
!
-f
"
${
PMODULES_HOME
}
/bin/xgettext"
]]
;
then
build gettext
"
${
GETTEXT_VERSION
}
"
fi
if
[[
!
-f
"
${
PMODULES_HOME
}
/bin/getopt"
]]
;
then
build getopt
"
${
GETOPT_VERSION
}
"
fi
if
[[
!
-f
"
${
PMODULES_HOME
}
/bin/dialog"
]]
;
then
build dialog
"
${
DIALOG_VERSION
}
"
fi
${
BOOTSTRAP_DIR
}
/coreutils/build
--bootstrap
--disable-cleanup
||
{
echo
"compiling 'coreutils' failed!"
;
exit
1
;
}
${
BOOTSTRAP_DIR
}
/gettext/build
--bootstrap
--disable-cleanup
||
{
echo
"compiling 'gettext' failed!"
;
exit
1
;
}
${
BOOTSTRAP_DIR
}
/getopt/build
--bootstrap
--disable-cleanup
||
{
echo
"compiling 'getopt' failed!"
;
exit
1
;
}
${
BOOTSTRAP_DIR
}
/dialog/build
--bootstrap
--disable-cleanup
||
{
echo
"compiling 'dialog' failed!"
;
exit
1
;
}
${
BOOTSTRAP_DIR
}
/bash/build
--bootstrap
--disable-cleanup
4.3.30
||
{
echo
"compiling 'bash' failed!"
;
exit
1
;
}
${
BOOTSTRAP_DIR
}
/Tcl/build
--bootstrap
--disable-cleanup
||
{
echo
"compiling 'Tcl' failed!"
;
exit
1
;
}
${
BOOTSTRAP_DIR
}
/Modules/build
--bootstrap
||
{
echo
"compiling 'Modules' failed!"
;
exit
1
;
}
if
[[
!
-f
"
${
PMODULES_HOME
}
/bin/bash"
]]
;
then
build bash
"4.3.30"
fi
mv
-v
"
${
PMODULES_HOME
}
/bin/modulecmd"
"
${
PMODULES_HOME
}
/bin/modulecmd.tcl"
if
[[
!
-e
"
${
PMODULES_HOME
}
/bin/tclsh"
]]
;
then
build Tcl
"
${
TCL_VERSION
}
"
fi
if
[[
!
-e
"
${
PMODULES_HOME
}
/bin/modulecmd.tcl"
]]
;
then
build Modules
"
${
MODULES_VERSION
}
"
mv
-v
"
${
PMODULES_HOME
}
/bin/modulecmd"
"
${
PMODULES_HOME
}
/bin/modulecmd.tcl"
fi
echo
"Done..."
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