-
Notifications
You must be signed in to change notification settings - Fork 25
/
makeCCSv3.sh
executable file
·41 lines (34 loc) · 979 Bytes
/
makeCCSv3.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
#!/bin/bash
script=$(readlink -f "$0")
scriptPath=$(dirname "$script")
CCSv3OutputDir="CCSv3"
CopySerialTimerHeader=1
echo "## Entering at 28335ModbusSlave directory..."
cd $scriptPath
echo
if [ -d $CCSv3OutputDir ]; then
echo "## Destroying old $CCSv3OutputDir directory..."
echo
rm -rf $CCSv3OutputDir;
fi
if [ ! -d $CCSv3OutputDir ]; then
echo "## Creating $CCSv3OutputDir directory..."
mkdir $CCSv3OutputDir
mkdir $CCSv3OutputDir/Include
mkdir $CCSv3OutputDir/Source
echo
fi
echo "## Copying .c files to $CCSv3OutputDir/Source..."
cp contrib/modbus/*.c $CCSv3OutputDir/Source
cp contrib/modbus/plataform/DSP2833x/*.c $CCSv3OutputDir/Source
echo
echo "## Copying .h files to $CCSv3OutputDir/Include..."
cp contrib/modbus/include/*.h $CCSv3OutputDir/Include
if [ $CopySerialTimerHeader == 1 ]; then
cp contrib/modbus/plataform/DSP2833x/include/*.h $CCSv3OutputDir/Include
fi
echo
echo "## Ziping CCSv3 fileds"
rm CCSv3.zip
zip -r CCSv3 CCSv3
echo "## Done!"