Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sergey Gorbunov
CbmTools
Commits
9abd126a
Commit
9abd126a
authored
Dec 16, 2021
by
sergeizharko
Browse files
Added file myBashFunctions.sh
parent
1d067a27
Changes
1
Hide whitespace changes
Inline
Side-by-side
macro/myBashFunctions.sh
0 → 100644
View file @
9abd126a
######
#
# Script:
# myBashFunctions.sh
#
# Description:
# The script defines several useful comands for bash terminal to work with cbmroot.
#
######
REGEXP_ISINTEGER
=
'^[0-9]+$'
# Command to rebuild cbmroot from any place of code
rebuild-cbm
()
{
# Variables
local
N_THREADS
=
1
# Check input parameters
while
[[
$#
>
0
]]
;
do
echo
${
1
}
case
${
1
}
in
-j
)
if
[[
${
2
}
=
~
$REGEXP_ISINTEGER
]]
;
then
N_THREADS
=
${
2
}
fi
;;
*
)
;;
esac
shift
done
# Run cbmroot compilation
pushd
.
cd
$VMCWORKDIR
/build
make
-j
"
${
N_THREADS
}
"
RES
=
$?
popd
if
[[
$RES
-eq
0
]]
;
then
echo
"CbmRoot compiled successfully!"
else
echo
"CbmRoot was not compiled, some errors occured"
fi
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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