-
Notifications
You must be signed in to change notification settings - Fork 1
/
Export.sh
executable file
·85 lines (67 loc) · 2.37 KB
/
Export.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
76
77
78
79
80
81
82
83
84
85
#!/bin/sh
# Author KMS - Martin Dubois, P. Eng.
# Copyright (C) 2021-2022 KMS
# Product EthCAN
# File Export.sh
# Usage ./Export.sh
# TODO Export
# Use KmsCopy
echo Executing Export.sh $1 $2 ...
# ===== Initialisation ======================================================
OS=`uname`
EXPORT=~/Export
EXP_PROD=$EXPORT/EthCAN
if [ "$2" = "" ]
then
DST_FOLDER=$EXP_PROD/$1_$OS
else
DST_FOLDER=$EXP_PROD/$1_$2_$OS
fi
# ===== Execution ===========================================================
if [ ! -d $EXPORT ]
then
mkdir $EXPORT
fi
if [ ! -d $EXP_PROD ]
then
mkdir $EXP_PROD
fi
mkdir $DST_FOLDER
if [ 0 != $? ] ; then
echo ERROR mkdir $DST_FOLDER failed
exit 10
fi
mkdir $DST_FOLDER/Binaries
mkdir $DST_FOLDER/Includes
mkdir $DST_FOLDER/Includes/EthCAN
mkdir $DST_FOLDER/Libraries
mkdir $DST_FOLDER/Packages
cp _DocUser/EthCAN.ReadMe.txt $DST_FOLDER
cp Binaries/EthCAN_Lib_Test $DST_FOLDER/Binaries
cp Binaries/EthCAN_Tool $DST_FOLDER/Binaries
cp Import/Binaries/KmsCopy $DST_FOLDER
cp Import/KmsBase.KmsLib.ReadMe.txt $DST_FOLDER
cp Includes/*.h $DST_FOLDER/Includes
cp Includes/EthCAN/*.h $DST_FOLDER/Includes/EthCAN
cp Libraries/EthCAN_Lib.a $DST_FOLDER/Libraries
cp EthCAN_Lib/_DocUser/EthCAN.EthCAN_Lib.ReadMe.txt $DST_FOLDER
cp EthCAN_Tool/_DocUser/EthCAN.EthCAN_Tool.ReadMe.txt $DST_FOLDER
cp Firmware0/_DocUser/EthCAN.Firmware0.ReadMe.txt $DST_FOLDER
cp Firmware1/_DocUser/EthCAN.Firmware1.ReadMe.txt $DST_FOLDER
cp Scripts/Import.sh $DST_FOLDER
cp Scripts/Import.sh.txt $DST_FOLDER
cp Scripts/Import.txt $DST_FOLDER
cp DoxyFile_en.txt $DST_FOLDER
cp RunDoxygen.sh $DST_FOLDER
if [ "Darwin" = "$OS" ]
then
# KmsVersion "kms-ethcan_" ".pkg" 13
cp Packages/kms-ethcan_1.1-10.pkg $DST_FOLDER/Packages
fi
if [ "Linux" = "$OS" ]
then
# KmsVersion "kms-ethcan_" ".deb" 13
cp Packages/kms-ethcan_1.1-10.deb $DST_FOLDER/Packages
fi
# ===== End =================================================================
echo OK