9.backup_conf.sh 2.58 KB
Newer Older
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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
#!/bin/bash
#
conf_dir=$1

if [ -z "$conf_dir" ]; then
 echo "configure folder is empty"
 exit 1 
fi

echo "--------------backup Configure $conf_dir--------------"

backup()
{
    
    src_dir="$1/$2/bin/Debug"
	dest_dir=$conf_dir"/$2"
    files=$3
    echo "------------------------------------"
    echo "backup ${src_dir}"
    echo "to ${dest_dir}"
    if [ ! -d $dest_dir ]; then
        mkdir -p $dest_dir
    fi
    
    for f in ${files[*]}; do
		file_path=$src_dir"/"$f
		cp -rf $file_path $dest_dir
		if [ $? != 0 ]; then
			echo 复制失败
			exit 1
		fi
	done


    #cp -Rf $src_dir/* $dest_dir
}



if [ -d $conf_dir ]; then
	echo "clear "$conf_dir
    rm -Rf $conf_dir
fi


project_dir="../Project.FLY.Thick.Blowing"
project_name="FLY.Thick.Blowing.UI.Fix.Client"
files=(\
	"unity" "layout" "music" "default"\
	"测厚仪说明书.pdf" \
	)
backup $project_dir $project_name $files

project_dir="../Project.FLY.Thick.Blowing"
project_name="FLY.Thick.Blowing.UI.Fix.Server"
files=(\
	"Gage1"\
	)
backup $project_dir $project_name $files


project_dir="../Project.FLY.Thick.BlowingScan"
project_name="FLY.Thick.BlowingScan.UI.Client"
files=(\
	"unity" "layout" "music" "default"\
	"测厚仪说明书.pdf" \
	)
backup $project_dir $project_name $files

project_dir="../Project.FLY.Thick.BlowingScan"
project_name="FLY.Thick.BlowingScan.UI.Server"
files=(\
	"Gage1"\
	)
backup $project_dir $project_name $files



project_dir="../Project.FLY.FeedbackRenZiJia"
project_name="FLY.FeedbackRenZiJia.UI.Server"
files=(\
	"Gage1"\
	)
backup $project_dir $project_name $files

project_dir="../Project.FLY.Weight"
project_name="FLY.Weight.UI.Server"
files=(\
	"Gage1"\
	)
backup $project_dir $project_name $files

project_dir="../Project.FLY.IBC"
project_name="FLY.IBC.UI.Server"
files=(\
	"Gage1"\
	)
backup $project_dir $project_name $files

project_dir="../Project.FLY.Winder_20190413"
project_name="FLY.Winder.UI.Server"
files=(\
	"Gage1"\
	)
backup $project_dir $project_name $files

project_dir="../Project.FLY.Weight2"
project_name="FLY.Weight2.UI.Server"
files=(\
	"Gage1"\
	)
backup $project_dir $project_name $files

project_dir="../Project.FLY.Integrated"
project_name="FLY.Integrated.UI.Server"
files=(\
	"Gage1"\
	)
backup $project_dir $project_name $files


潘栩锋's avatar
潘栩锋 committed
122 123 124 125 126 127 128
project_dir="../Project.FLY.Thick.Blowing360"
project_name="FLY.Thick.Blowing360.UI.Client"
files=(\
	"unity" "layout" "music" "default"\
	"测厚仪说明书.pdf" \
	)
backup $project_dir $project_name $files
129

潘栩锋's avatar
潘栩锋 committed
130 131 132 133 134 135
project_dir="../Project.FLY.Thick.Blowing360"
project_name="FLY.Thick.Blowing360.UI.Server"
files=(\
	"Gage1"\
	)
backup $project_dir $project_name $files
136