Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WCCL
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
WCCL
Commits
12c26ee8
Commit
12c26ee8
authored
14 years ago
by
ilor
Browse files
Options
Downloads
Patches
Plain Diff
wccl button
parent
8b158977
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/button.sh
+83
-0
83 additions, 0 deletions
tools/button.sh
with
83 additions
and
0 deletions
tools/button.sh
0 → 100755
+
83
−
0
View file @
12c26ee8
#!/bin/bash
BUILDDIR
=
qtcreator-build
PROJECTS
=
"corpus2 wccl"
BASEDIR
=
../..
CURDIR
=
`
pwd
`
FILTER
=
"grep -i -C 4 error"
#FILTER=cat
function
fail
()
{
echo
"!!!
$1
in
$i
!!!"
cd
$CURDIR
exit
1
}
usage
()
{
cat
<<
EOF
usage:
$0
options
OPTIONS:
-h Show this message
-c make clean before building
-e rm CMakeCache before building
-n skip make install step
-p pull from git repo first
EOF
}
OPT_CLEAN
=
OPT_CACHE
=
OPT_INSTALL
=
1
OPT_PULL
=
while
getopts
"hcenp"
OPTION
do
case
$OPTION
in
h
)
usage
exit
0
;;
c
)
OPT_CLEAN
=
1
;;
e
)
OPT_CACHE
=
1
;;
n
)
OPT_INSTALL
=
;;
p
)
OPT_PULL
=
1
;;
esac
done
for
i
in
$PROJECTS
;
do
cd
$BASEDIR
/
$i
/
$BUILDDIR
||
fail
"cd error"
pwd
if
[[
!
-z
$OPT_PULL
]]
;
then
echo
"--- Pulling
$i
..."
git pull
fi
echo
"--- Configuring
$i
..."
if
[[
!
-z
$OPT_CACHE
]]
;
then
echo
"--- rm CMakeCache.txt in
$i
..."
rm
CMakeCache.txt
fi
cmake ..
>
/dev/null
||
fail
"cmake error"
if
[[
!
-z
$OPT_CLEAN
]]
;
then
echo
"--- Cleaning
$i
..."
make clean
>
/dev/null
||
fail
"make clean error"
fi
echo
"--- Building
$i
..."
make
-j4
>
/dev/null
||
fail
"make error"
if
[[
!
-z
$OPT_INSTALL
]]
;
then
echo
"--- Installing
$i
..."
sudo
make
install
>
/dev/null
||
fail
"make install error"
fi
sudo
ldconfig
echo
"--- Testing
$i
..."
make
test
>
/dev/null
||
fail
"make test error in"
done
cd
$CURDIR
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment