Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangjie
OpenXG-RAN
Commits
67eb92cd
Commit
67eb92cd
authored
Jun 13, 2016
by
Frédéric Leroy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check if the distribution is supported
Thank to Thomas Laurent for refactorize get_distribution_released
parent
51b5fcd4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
cmake_targets/tools/build_helper
cmake_targets/tools/build_helper
+30
-0
No files found.
cmake_targets/tools/build_helper
View file @
67eb92cd
...
...
@@ -67,7 +67,33 @@ echo_warning() { cecho "$*" $yellow ;}
echo_success() { cecho "$*" $green ;}
echo_info() { cecho "$*" $blue ;}
########################
# distribution helpers #
########################
# This function return a string to identify the distribution we are running
# If we can't check the distribution, it returns "Unknown"
# This function return always true as exit code by design
# Examples:
# Ubuntu16.04
# Debian8.5
get_distribution_release() {
local distributor
if distributor=$(lsb_release -si 2>/dev/null) ; then
echo $distributor$(lsb_release -sr)
else
echo Unknown
fi
}
check_supported_distribution() {
local distribution=$(get_distribution_release)
case "$distribution" in
"Ubuntu16.04") return 0 ;;
"Ubuntu14.04") return 0 ;;
esac
return 1
}
###########################
# Cleaners
...
...
@@ -231,6 +257,10 @@ check_install_additional_tools (){
}
check_install_oai_software() {
if ! check_supported_distribution; then
echo_error "Your distribution $(get_distribution_release) is not supported by oai !"
exit 1
fi
$SUDO apt-get update
$SUDO apt-get install -y \
autoconf \
...
...
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