forked from fledge-iot/fledge-rule-simple-expression
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·23 lines (19 loc) · 728 Bytes
/
build.sh
File metadata and controls
executable file
·23 lines (19 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# Pass any cmake options this way:
# ./build.sh -DFLEDGE_INSTALL=/some_path/Fledge
#
os_name=$(grep -o '^NAME=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')
os_version=$(grep -o '^VERSION_ID=.*' /etc/os-release | cut -f2 -d\" | sed 's/"//g')
if [[ ( $os_name == *"Red Hat"* || $os_name == *"CentOS"* ) ]]; then
if [ -f build_rhel.sh ]; then
echo "Custom build for platform is ${os_name}, Version: ${os_version}"
./build_rhel.sh $@
fi
elif apt --version 2>/dev/null; then
if [ -f build_deb.sh ]; then
echo "Custom build for platform is ${os_name}, Version: ${os_version}"
./build_deb.sh $@
fi
else
echo "Custom build script not yet implemented for platform ${os_name}, Version: ${os_version}"
fi