Skip to content

Commit 435ddc4

Browse files
committed
Fixed timezone bug in last modified method for ceLog
1 parent 9e95de9 commit 435ddc4

File tree

11 files changed

+379
-319
lines changed

11 files changed

+379
-319
lines changed

examples/I2C/I2C.sh

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
1-
#!/bin/bash
2-
3-
SCRIPTNAME=`basename "$0"`
4-
PRJNAME="${SCRIPTNAME%.*}"
5-
SCRIPTDIR="${0%/$PRJNAME.*}"
6-
echo "Project: $PRJNAME"
7-
echo "Script directory: $SCRIPTDIR"
8-
9-
if [ $# == 1 ]; then
10-
opt_sh=$1
11-
else
12-
echo "You can input argument:"
13-
echo " 'cmake' : to generate cmake files, build, and install"
14-
echo " 'build': to build and run"
15-
echo " ..."
16-
read -p "Input an option: " opt_sh
17-
fi
18-
19-
if [[ "$opt_sh" == "" ]]; then
20-
opt_sh="build"
21-
fi
22-
23-
echo "Option: $opt_sh"
24-
echo " ."
25-
echo " ."
26-
echo " ."
27-
28-
cd $SCRIPTDIR
29-
if [[ "$opt_sh" == "cmake" ]]; then
30-
echo "Preparing cmake file"
31-
if [[ ! -d "./build" ]]; then
32-
mkdir -p build
33-
fi
34-
rm -r ./build/*
35-
cd build
36-
cmake -D CMAKE_BUILD_TYPE=Release \
37-
-D CMAKE_INSTALL_PREFIX=/usr/local \
38-
..
39-
cd ..
40-
echo " ."
41-
echo " ."
42-
echo " ."
43-
fi
44-
45-
if [[ $opt_sh == "cmake" ]] || [[ $opt_sh == "build" ]]; then
46-
echo "Building ..."
47-
cd $SCRIPTDIR/build && make # && sudo make install
48-
if [[ $? == 0 ]]; then
49-
echo "Build successful"
50-
echo "Running ..."
51-
./$PRJNAME
52-
else
53-
echo "Error in compiling"
54-
fi
55-
else
56-
echo "Running ..."
57-
./$PRJNAME
58-
fi
59-
60-
1+
#!/bin/bash
2+
3+
SCRIPTNAME=`basename "$0"`
4+
PRJNAME="${SCRIPTNAME%.*}"
5+
SCRIPTDIR="${0%/$PRJNAME.*}"
6+
echo "Project: $PRJNAME"
7+
echo "Script directory: $SCRIPTDIR"
8+
9+
if [ $# == 1 ]; then
10+
opt_sh=$1
11+
else
12+
echo "You can input argument:"
13+
echo " 'cmake' : to generate cmake files, build, and install"
14+
echo " 'build': to build and run"
15+
echo " ..."
16+
read -p "Input an option: " opt_sh
17+
fi
18+
19+
if [[ "$opt_sh" == "" ]]; then
20+
opt_sh="build"
21+
fi
22+
23+
echo "Option: $opt_sh"
24+
echo " ."
25+
echo " ."
26+
echo " ."
27+
28+
cd $SCRIPTDIR
29+
if [[ "$opt_sh" == "cmake" ]]; then
30+
echo "Preparing cmake file"
31+
if [[ ! -d "./build" ]]; then
32+
mkdir -p build
33+
fi
34+
rm -r ./build/*
35+
cd build
36+
cmake -D CMAKE_BUILD_TYPE=Release \
37+
-D CMAKE_INSTALL_PREFIX=/usr/local \
38+
..
39+
cd ..
40+
echo " ."
41+
echo " ."
42+
echo " ."
43+
fi
44+
45+
if [[ $opt_sh == "cmake" ]] || [[ $opt_sh == "build" ]]; then
46+
echo "Building ..."
47+
cd $SCRIPTDIR/build && make # && sudo make install
48+
if [[ $? == 0 ]]; then
49+
echo "Build successful"
50+
echo "Running ..."
51+
./$PRJNAME
52+
else
53+
echo "Error in compiling"
54+
fi
55+
else
56+
echo "Running ..."
57+
./$PRJNAME
58+
fi
59+
60+

examples/Log/Log.sh

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
1-
#!/bin/bash
2-
3-
SCRIPTNAME=`basename "$0"`
4-
PRJNAME="${SCRIPTNAME%.*}"
5-
SCRIPTDIR="${0%/$PRJNAME.*}"
6-
echo "Project: $PRJNAME"
7-
echo "Script directory: $SCRIPTDIR"
8-
9-
if [ $# == 1 ]; then
10-
opt_sh=$1
11-
else
12-
echo "You can input argument:"
13-
echo " 'cmake' : to generate cmake files, build, and install"
14-
echo " 'build': to build and run"
15-
echo " ..."
16-
read -p "Input an option: " opt_sh
17-
fi
18-
19-
if [[ "$opt_sh" == "" ]]; then
20-
opt_sh="build"
21-
fi
22-
23-
echo "Option: $opt_sh"
24-
echo " ."
25-
echo " ."
26-
echo " ."
27-
28-
cd $SCRIPTDIR
29-
if [[ "$opt_sh" == "cmake" ]]; then
30-
echo "Preparing cmake file"
31-
if [[ ! -d "./build" ]]; then
32-
mkdir -p build
33-
fi
34-
rm -r ./build/*
35-
cd build
36-
cmake -D CMAKE_BUILD_TYPE=Release \
37-
-D CMAKE_INSTALL_PREFIX=/usr/local \
38-
..
39-
cd ..
40-
echo " ."
41-
echo " ."
42-
echo " ."
43-
fi
44-
45-
if [[ $opt_sh == "cmake" ]] || [[ $opt_sh == "build" ]]; then
46-
echo "Building ..."
47-
cd $SCRIPTDIR/build && make # && sudo make install
48-
if [[ $? == 0 ]]; then
49-
echo "Build successful"
50-
echo "Running ..."
51-
./$PRJNAME
52-
else
53-
echo "Error in compiling"
54-
fi
55-
else
56-
echo "Running ..."
57-
./$PRJNAME
58-
fi
59-
60-
1+
#!/bin/bash
2+
3+
SCRIPTNAME=`basename "$0"`
4+
PRJNAME="${SCRIPTNAME%.*}"
5+
SCRIPTDIR="${0%/$PRJNAME.*}"
6+
echo "Project: $PRJNAME"
7+
echo "Script directory: $SCRIPTDIR"
8+
9+
if [ $# == 1 ]; then
10+
opt_sh=$1
11+
else
12+
echo "You can input argument:"
13+
echo " 'cmake' : to generate cmake files, build, and install"
14+
echo " 'build': to build and run"
15+
echo " ..."
16+
read -p "Input an option: " opt_sh
17+
fi
18+
19+
if [[ "$opt_sh" == "" ]]; then
20+
opt_sh="build"
21+
fi
22+
23+
echo "Option: $opt_sh"
24+
echo " ."
25+
echo " ."
26+
echo " ."
27+
28+
cd $SCRIPTDIR
29+
if [[ "$opt_sh" == "cmake" ]]; then
30+
echo "Preparing cmake file"
31+
if [[ ! -d "./build" ]]; then
32+
mkdir -p build
33+
fi
34+
rm -r ./build/*
35+
cd build
36+
cmake -D CMAKE_BUILD_TYPE=Release \
37+
-D CMAKE_INSTALL_PREFIX=/usr/local \
38+
..
39+
cd ..
40+
echo " ."
41+
echo " ."
42+
echo " ."
43+
fi
44+
45+
if [[ $opt_sh == "cmake" ]] || [[ $opt_sh == "build" ]]; then
46+
echo "Building ..."
47+
cd $SCRIPTDIR/build && make # && sudo make install
48+
if [[ $? == 0 ]]; then
49+
echo "Build successful"
50+
echo "Running ..."
51+
./$PRJNAME
52+
else
53+
echo "Error in compiling"
54+
fi
55+
else
56+
echo "Running ..."
57+
./$PRJNAME
58+
fi
59+
60+

examples/Modbus/Modbus.sh

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
1-
#!/bin/bash
2-
3-
SCRIPTNAME=`basename "$0"`
4-
PRJNAME="${SCRIPTNAME%.*}"
5-
SCRIPTDIR="${0%/$PRJNAME.*}"
6-
echo "Project: $PRJNAME"
7-
echo "Script directory: $SCRIPTDIR"
8-
9-
if [ $# == 1 ]; then
10-
opt_sh=$1
11-
else
12-
echo "You can input argument:"
13-
echo " 'cmake' : to generate cmake files, build, and install"
14-
echo " 'build': to build and run"
15-
echo " ..."
16-
read -p "Input an option: " opt_sh
17-
fi
18-
19-
if [[ "$opt_sh" == "" ]]; then
20-
opt_sh="build"
21-
fi
22-
23-
echo "Option: $opt_sh"
24-
echo " ."
25-
echo " ."
26-
echo " ."
27-
28-
cd $SCRIPTDIR
29-
if [[ "$opt_sh" == "cmake" ]]; then
30-
echo "Preparing cmake file"
31-
if [[ ! -d "./build" ]]; then
32-
mkdir -p build
33-
fi
34-
rm -r ./build/*
35-
cd build
36-
cmake -D CMAKE_BUILD_TYPE=Release \
37-
-D CMAKE_INSTALL_PREFIX=/usr/local \
38-
..
39-
cd ..
40-
echo " ."
41-
echo " ."
42-
echo " ."
43-
fi
44-
45-
if [[ $opt_sh == "cmake" ]] || [[ $opt_sh == "build" ]]; then
46-
echo "Building ..."
47-
cd $SCRIPTDIR/build && make # && sudo make install
48-
if [[ $? == 0 ]]; then
49-
echo "Build successful"
50-
echo "Running ..."
51-
./$PRJNAME
52-
else
53-
echo "Error in compiling"
54-
fi
55-
else
56-
echo "Running ..."
57-
./$PRJNAME
58-
fi
59-
60-
1+
#!/bin/bash
2+
3+
SCRIPTNAME=`basename "$0"`
4+
PRJNAME="${SCRIPTNAME%.*}"
5+
SCRIPTDIR="${0%/$PRJNAME.*}"
6+
echo "Project: $PRJNAME"
7+
echo "Script directory: $SCRIPTDIR"
8+
9+
if [ $# == 1 ]; then
10+
opt_sh=$1
11+
else
12+
echo "You can input argument:"
13+
echo " 'cmake' : to generate cmake files, build, and install"
14+
echo " 'build': to build and run"
15+
echo " ..."
16+
read -p "Input an option: " opt_sh
17+
fi
18+
19+
if [[ "$opt_sh" == "" ]]; then
20+
opt_sh="build"
21+
fi
22+
23+
echo "Option: $opt_sh"
24+
echo " ."
25+
echo " ."
26+
echo " ."
27+
28+
cd $SCRIPTDIR
29+
if [[ "$opt_sh" == "cmake" ]]; then
30+
echo "Preparing cmake file"
31+
if [[ ! -d "./build" ]]; then
32+
mkdir -p build
33+
fi
34+
rm -r ./build/*
35+
cd build
36+
cmake -D CMAKE_BUILD_TYPE=Release \
37+
-D CMAKE_INSTALL_PREFIX=/usr/local \
38+
..
39+
cd ..
40+
echo " ."
41+
echo " ."
42+
echo " ."
43+
fi
44+
45+
if [[ $opt_sh == "cmake" ]] || [[ $opt_sh == "build" ]]; then
46+
echo "Building ..."
47+
cd $SCRIPTDIR/build && make # && sudo make install
48+
if [[ $? == 0 ]]; then
49+
echo "Build successful"
50+
echo "Running ..."
51+
./$PRJNAME
52+
else
53+
echo "Error in compiling"
54+
fi
55+
else
56+
echo "Running ..."
57+
./$PRJNAME
58+
fi
59+
60+

0 commit comments

Comments
 (0)