Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CbmTools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sergey Gorbunov
CbmTools
Commits
9abd126a
Commit
9abd126a
authored
3 years ago
by
sergeizharko
Browse files
Options
Downloads
Patches
Plain Diff
Added file myBashFunctions.sh
parent
1d067a27
No related branches found
No related tags found
1 merge request
!2
Updates
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
macro/myBashFunctions.sh
+44
-0
44 additions, 0 deletions
macro/myBashFunctions.sh
with
44 additions
and
0 deletions
macro/myBashFunctions.sh
0 → 100644
+
44
−
0
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
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment