-
Notifications
You must be signed in to change notification settings - Fork 0
/
gen_soft_cfg.sh
executable file
·91 lines (82 loc) · 2.17 KB
/
gen_soft_cfg.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
86
87
88
89
90
91
#!/bin/bash
function GenCimCfgInfo()
{
GenFileCfgInfo $1
return $?;
}
function GenBimCfgInfo()
{
GenFileCfgInfo $1
return $?;
}
function GenRfCfgInfo()
{
GenFileCfgInfo $1
return $?;
}
function GenWebSoftCfgInfo()
{
GenFileCfgInfo $WEB_SOFT_PACKET_NAME
return $?
}
function GenWebSoftCfgFile()
{
TmpCfgFile=$4
GenCimCfgInfo $1
GenBimCfgInfo $3
GenRfCfgInfo $2
echo "BEGIN" >$TmpCfgFile
echo "<BigPacket>" >>$TmpCfgFile
echo "Type=224" >>$TmpCfgFile
echo "BigName=${WEB_SOFT_PACKET_NAME}.tar.gz" >>$TmpCfgFile
echo "BigVersion=V100R001C00SP33" >>$TmpCfgFile
echo "Patch=" >>$TmpCfgFile
GetCurSoftSubPacket $1
echo "SubCount=$SoftSubCount" >>$TmpCfgFile
cat $SoftCfg/${1}.cfg >>$TmpCfgFile
cat $SoftCfg/${2}.cfg >>$TmpCfgFile
cat $SoftCfg/${3}.cfg >>$TmpCfgFile
echo "" >>$TmpCfgFile
echo "END" >>$TmpCfgFile
}
function GenWebSoftA8CfgFile()
{
TmpCfgFile=$2
GenCimCfgInfo $1
echo "BEGIN" >$TmpCfgFile
echo "<BigPacket>" >>$TmpCfgFile
echo "Type=224" >>$TmpCfgFile
echo "BigName=cimpackage.tar.gz" >>$TmpCfgFile
echo "BigVersion=V100R001C00SP33" >>$TmpCfgFile
echo "Patch=" >>$TmpCfgFile
GetCurSoftSubPacket $1
echo "SubCount=$CurSoftSubPacket" >>$TmpCfgFile
cat $SoftCfg/${1}.cfg >>$TmpCfgFile
echo "" >>$TmpCfgFile
echo "END" >>$TmpCfgFile
}
function GenNetEcoSoftCfgFile()
{
local TmpSoftName=$1
local TmpCfgFile=$2
GenWebSoftCfgInfo $TmpSoftName
echo "BEGIN" >$TmpCfgFile
echo "<BigPacket>" >>$TmpCfgFile
echo "Type=224" >>$TmpCfgFile
echo "BigName=${NETECO_SOFT_PACKET_NAME}.tar.gz" >>$TmpCfgFile
echo "BigVersion=V100R001C00SP33" >>$TmpCfgFile
echo "Patch=" >>$TmpCfgFile
GetCurSoftSubPacket $WEB_SOFT_PACKET_NAME
echo "SubCount=$SoftSubCount" >>$TmpCfgFile
cat $SoftCfg/${WEB_SOFT_PACKET_NAME}.cfg >>$TmpCfgFile
echo "" >>$TmpCfgFile
echo "END" >>$TmpCfgFile
}
function GenNetEcoSoftXmlFile()
{
local TmpSoftName=$1
local TmpCfgFile=$2
GenWebSoftCfgInfo $TmpSoftName
. $SoftCfg/${WEB_SOFT_PACKET_NAME}.cfg
echo "<?xml version="1.0" encoding="iso-8859-1"?>" >$TmpCfgFile
}