Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CLASS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
sens
CLASS
Commits
e4988081
Commit
e4988081
authored
7 years ago
by
BaM
Browse files
Options
Downloads
Patches
Plain Diff
cleaning + add internet co check for test build
parent
f865d7a7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
install.sh
+29
-25
29 additions, 25 deletions
install.sh
with
29 additions
and
25 deletions
install.sh
+
29
−
25
View file @
e4988081
...
...
@@ -33,6 +33,11 @@ echo "--------------------------------------------"
exit
418
}
J
=
"1"
BUILD
=
false
CLEAN
=
false
GTEST
=
false
function
build
()
{
if
[
!
-d
"bld"
]
;
then
...
...
@@ -40,21 +45,14 @@ function build ()
fi
cd
bld
if
[
"
$1
"
==
"WithNoTest"
]
;
then
cmake ..
if
[
"
$GTEST
"
==
"false"
]
;
then
make
-j
${
J
}
CLASSpkg_root CLASSpkg CLASSGui
fi
if
[
"
$1
"
==
"WithTest"
]
;
then
cmake ..
exit
0
else
make
-j
${
J
}
../bin/RunTest
fi
if
[
"
$1
"
==
"TestOnly"
]
;
then
cmake ..
make
-j
${
J
}
RunTest
../bin/RunTest
exit
0
fi
}
...
...
@@ -69,16 +67,17 @@ function clean ()
rm
-rf
source
/src/
*
Dict.cxx
rm
-rf
lib
rm
-rf
bin
if
[
"
$BUILD
"
=
"false"
]
;
then
exit
0
fi
}
##############################################################################
### calls of all functions
##############################################################################
J
=
"1"
BUILD
=
false
CLEAN
=
false
GTEST
=
false
# Help if no argument
if
[
-z
"
$*
"
]
;
then
usage
;
fi
...
...
@@ -91,7 +90,7 @@ for arg in "$@"; do
--build
|
-build
|
build
)
BUILD
=
true
;;
--gtest
|
-gtest
|
gtest
)
GTEST
=
true
;;
BUILD
=
true
;
GTEST
=
true
;;
--clean
|
-clean
|
clean
)
CLEAN
=
true
;;
--clean-build
)
...
...
@@ -103,22 +102,27 @@ for arg in "$@"; do
esac
done
if
[
"
${
CLEAN
}
"
=
true
]
;
then
clean
fi
if
[
"
${
BUILD
}
"
=
true
]
&&
[
"
${
GTEST
}
"
=
false
]
;
then
build
"WithNoTest"
# Test is gtest is already there or if we have an internet connection
if
[
"
${
GTEST
}
"
=
true
]
;
then
echo
-e
"GET http://google.com HTTP/1.0
\n\n
"
| nc google.com 80
>
/dev/null 2>&1
if
[
!
$?
-eq
0
]
&&
[
!
-d
"bld/GTest/gtest/src/gtest"
]
;
then
echo
"An internet connection is required to compile the test"
exit
1
fi
fi
if
[
"
${
BUILD
}
"
=
true
]
&&
[
"
${
GTEST
}
"
=
true
]
;
then
build
"WithTest"
if
[
"
${
CLEAN
}
"
=
true
]
;
then
clean
fi
if
[
"
${
BUILD
}
"
=
false
]
&&
[
"
${
GTEST
}
"
=
true
]
;
then
build
"TestOnly"
if
[
"
${
BUILD
}
"
=
true
]
;
then
build
fi
usage
exit
0
EOF
...
...
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