2.get_exe.sh 3.32 KB
Newer Older
潘栩锋's avatar
潘栩锋 committed
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
#!/bin/bash
#获取git 最后一个 tag 的描述!!!!
LatestTag=$(git describe --tags `git rev-list --tags --max-count=1`)

install_dir="和美安装包_"$LatestTag
if [ -e $install_dir ]; then
	rm -rf $install_dir
fi
#复制 install 到 测厚仪安装包
cp -rf install $install_dir

install_dir=$install_dir"/佛山市枫莱尔自动化技术有限公司/windows"

copy_to()
{
    src_dir=$1
    dest_dir=$2
    files=$3

	#检测文件夹是否存在
	#存在,删除全部数据,再新创建;
	#不存在,创建。
	if [ -e $dest_dir ]; then
        rm -rf $dest_dir
    fi

	mkdir -p $dest_dir
	
	echo 复制 $dest_dir

	for f in ${files[*]}; do
		file_path=$src_dir"/"$f
		cp -rf $file_path $dest_dir
		if [ $? != 0 ]; then
			echo 复制失败
			exit 1
		fi
	done
}

copy_to2()
{
    src_dir=$1
	dest_dir=$2
    files=$3

    src_dir=$src_dir"/bin/Debug" 
	dest_dir=$install_dir"/"$dest_dir
    copy_to $src_dir $dest_dir $files
}

# Project.FLY.Thick.Blowing

src_dir="../Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI.Fix.Client"
dest_dir="FLY.Thick.Blowing.UI.Fix.Client"
files=(\
	"FLY.Thick.Blowing.UI.Fix.Client.exe" \
58
	"x64" "x86" \
潘栩锋's avatar
潘栩锋 committed
59
	"unity" "layout" "music" "default"\
潘栩锋's avatar
潘栩锋 committed
60
	"版本说明.txt" "测厚仪说明书.pdf" \
潘栩锋's avatar
潘栩锋 committed
61
	"nlog.config" "weighterColorDb.json"\
潘栩锋's avatar
潘栩锋 committed
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
	)
copy_to2 $src_dir $dest_dir $files


src_dir="../Project.FLY.Thick.Blowing/FLY.Thick.Blowing.UI.Fix.Server" 
dest_dir="FLY.Thick.Blowing.UI.Fix.Server" 
files=(\
	"FLY.Thick.Blowing.UI.Fix.Server.exe" \
	"Gage1" "x64" "x86" \
	"nlog.config" \
	)
copy_to2 $src_dir $dest_dir $files

#Project.FLY.FeedbackRenZiJia
src_dir="../Project.FLY.FeedbackRenZiJia/FLY.FeedbackRenZiJia.UI.Server"
dest_dir="FLY.FeedbackRenZiJia.UI.Server"
files=(\
	"FLY.FeedbackRenZiJia.UI.Server.exe" \
	"Gage1" "x64" "x86" \
	"nlog.config" \
	)
copy_to2 $src_dir $dest_dir $files

#Project.FLY.Weight
src_dir="../Project.FLY.Weight/FLY.Weight.UI.Server"
dest_dir="FLY.Weight.UI.Server"
files=(\
	"FLY.Weight.UI.Server.exe" \
潘栩锋's avatar
潘栩锋 committed
90
	"Gage1" "x64" "x86" \
潘栩锋's avatar
潘栩锋 committed
91
	"nlog.config" \
潘栩锋's avatar
潘栩锋 committed
92 93 94 95 96 97 98 99
	)
copy_to2 $src_dir $dest_dir $files

#Project.FLY.Winder
src_dir="../Project.FLY.Winder_20190413/FLY.Winder.UI.Server"
dest_dir="FLY.Winder.UI.Server"
files=(\
	"FLY.Winder.UI.Server.exe" \
潘栩锋's avatar
潘栩锋 committed
100
	"Gage1" "x64" "x86" \
潘栩锋's avatar
潘栩锋 committed
101
	"nlog.config" \
潘栩锋's avatar
潘栩锋 committed
102 103 104 105 106 107 108 109
	)
copy_to2 $src_dir $dest_dir $files

#Project.FLY.IBC
src_dir="../Project.FLY.IBC/FLY.IBC.UI.Server"
dest_dir="FLY.IBC.UI.Server"
files=(\
	"FLY.IBC.UI.Server.exe" \
潘栩锋's avatar
潘栩锋 committed
110
	"Gage1" "x64" "x86" \
潘栩锋's avatar
潘栩锋 committed
111
	"nlog.config" \
潘栩锋's avatar
潘栩锋 committed
112 113 114
	)
copy_to2 $src_dir $dest_dir $files

115 116 117 118 119 120 121 122 123 124
#Project.FLY.Integrated
src_dir="../Project.FLY.Integrated/FLY.Integrated.UI.Server"
dest_dir="FLY.Integrated.UI.Server"
files=(\
	"FLY.Integrated.UI.Server.exe" \
	"Gage1" "x64" "x86" \
	"nlog.config" \
	)
copy_to2 $src_dir $dest_dir $files

潘栩锋's avatar
潘栩锋 committed
125 126 127

# Project.FLY.Thick.BlowingScan

潘栩锋's avatar
潘栩锋 committed
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
# src_dir="../Project.FLY.Thick.BlowingScan/FLY.Thick.BlowingScan.UI.Client"
# dest_dir="FLY.Thick.BlowingScan.UI.Client"
# files=(\
# 	"FLY.Thick.BlowingScan.UI.Client.exe" \
# 	"main_module" "csysparam.xml" "layout" "music" "版本说明.txt" "测厚仪说明书.pdf" \
# 	"nlog.config" \
# 	)
# copy_to2 $src_dir $dest_dir $files


# src_dir="../Project.FLY.Thick.BlowingScan/FLY.Thick.BlowingScan.UI.Server" 
# dest_dir="FLY.Thick.BlowingScan.UI.Server" 
# files=(\
# 	"FLY.Thick.BlowingScan.UI.Server.exe" \
# 	"Gage1" "x64" "x86" \
# 	"nlog.config" \
# 	)
# copy_to2 $src_dir $dest_dir $files
潘栩锋's avatar
潘栩锋 committed
146
echo 完成