-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_linux_cockpit_ui.sh
executable file
·77 lines (59 loc) · 2.12 KB
/
run_linux_cockpit_ui.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
# Set basic variables:
# Command name.
input=$1
# Tool name.
tool=$2
target_folder_name="target"
target_platform="cockpit_ui"
# Create basic target folder.
if [ ! -d $target_folder_name ]; then
mkdir $target_folder_name
fi
# Execute commands:
if [ "$input" == "test" ]; then
# Create build and binary files
cmake -DTARGET_PLATFROM="$target_platform" . -B"${target_folder_name}"/build
cmake --build "${target_folder_name}"/build
cmake --build "${target_folder_name}"/build -- -j2 test
elif [ "$input" == "doxygen" ]; then
# Create build and binary files
cmake -DTARGET_PLATFROM="$target_platform" -H. -B"${target_folder_name}"/build
cmake --build "${target_folder_name}"/build -- -j9 docs
make install docs
elif [ "$input" == "coverage" ]; then
if [ ! -d "$target_folder_name"/coverage ]; then
mkdir "$target_folder_name"/coverage
fi
echo "TO DO: coverage"
elif [ "$input" == "clean" ]; then
rm -r "${target_folder_name}"/
elif [ "$input" == "codeblocks" ]; then
cmake -G"CodeBlocks - Unix Makefiles" . -B"${target_folder_name}"/build
cmake --build "${target_folder_name}"/build -- -j3
elif [ "$input" == "Eclipse" ]; then
cmake -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . -B"${target_folder_name}"/build
cmake --build "${target_folder_name}"/build -- -j3
elif [ "$input" == "help" ]; then
echo "###########################################"
echo " "
echo ----------------- HELP --------------------
echo -- Chose one from the following command: --
echo -------------------------------------------
echo " --- #test# : "
echo " --- #doxygen# : "
echo " --- #coverage# : "
echo " --- #clean# : "
echo " --- #Codeblocks# : "
echo " --- #Eclipse# : "
echo " --- #help# : "
echo " "
echo "###########################################"
else
if [ ! -d "$target_folder_name"/docs ]; then
mkdir "$target_folder_name"/docs
fi
# Create build and binary files
cmake -DTARGET_PLATFROM="$target_platform" . -B"${target_folder_name}"/build
cmake --build "${target_folder_name}"/build
fi