dpkg/build.sh

678 lines
18 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

oem=$1 #厂商
password="hg123123" #电脑密码
cpu=$(arch) #cpu架构
sys=$(cat /etc/issue)
sys=${sys%% *} #操作系统
dpkgpath="" #打包路径
dpkgarch="" #打包时的版本
libname="" #动态库名字
libpath="" #打包时库路径
time2=$(date "+%g%j") #版本控制
ismount=-1 #是否挂载服务器成功 0成功 非0失败
FIND_FILE="/home/samba/dpkg/Package" #服务器存放打包路径 不可修改
dpkgtype="app"
ver3=10
sanelibname=""
syspath="" #系统库路径
dpkgtype="" #哪种打包方式 uos 还是kylin
OEMHELPNAME="HuaGoScan"
#web so 只走kylin的打包方式
if [ $2 ];
then
dpkgtype=$2 #可以手动设置操作系统来进行打包
echo "$dpkgtype"
else
if [ "$sys" == "UnionTech" ];
then
dpkgtype=uos
else
dpkgtype=kylin
fi
fi
if [ $3 ];
then
password=$3
fi
echo "$password"
sleep 1
if [ "$oem" != "hg" ] \
&& [ "$oem" != "lsc" ] \
&& [ "$oem" != "hw" ] \
&& [ "$oem" != "hgweb" ] \
&& [ "$oem" != "lscweb" ] \
&& [ "$oem" != "hgso" ] \
&& [ "$oem" != "lscso" ] \
&& [ "$oem" != "hwso" ] \
&& [ "$oem" != "hwweb" ] \
&& [ "$oem" != "lscsm" ]\
&& [ "$oem" != "hgsm" ]\
&& [ "$oem" != "hgtool" ]\
&& [ "$oem" != "ctsso" ]\
&& [ "$oem" != "ctsweb" ]\
&& [ "$oem" != "cts" ]\
&& [ "$oem" != "zg" ]\
&& [ "$oem" != "zgso" ]\
&& [ "$oem" != "zgweb" ]\
&& [ "$oem" != "dl" ]\
&& [ "$oem" != "dlso" ]\
&& [ "$oem" != "dlweb" ]\
&& [ "$oem" != "zj" ]\
&& [ "$oem" != "zjso" ]\
&& [ "$oem" != "zjweb" ]\
&& [ "$oem" != "neu" ]\
&& [ "$oem" != "neuso" ]\
&& [ "$oem" != "neuweb" ];
then
echo "参数错误:$oem !!!"
echo "参数:华高:hg || hgweb ||hgso 立思层:lsc || lscweb ||lscso 汉王:hw || hwweb || hwso 沧田:cts"
exit 1
fi
if [ "${oem:0-2:2}" == "so" ] || [ "${oem:0-2:2}" == "sm" ];
then
dpkgtype=kylin
sanelibname="${oem%${oem:0-2:2}*}"
echo $sanelibname
elif [ "${oem:0-3:3}" == "web" ];
then
dpkgtype=kylin
sanelibname="${oem%${oem:0-3:3}*}"
echo $sanelibname
elif [ "${oem:0-4:4}" == "tool" ];
then
dpkgtype=kylin
sanelibname="${oem%${oem:0-4:4}*}"
echo $sanelibname
else
sanelibname=$oem
echo $sanelibname
fi
function appbuild()
{
pwd
echo "-----------------------------start-----------------------------"
#GIT CODE
rm ../release/$syspath/$cpu/*
git -C ../release clean -df
git -C ../release checkout .
git -C ../release pull
git -C ../sdk clean -df
git -C ../sdk checkout .
git -C ../sdk pull
git -C ../code_device clean -df
git -C ../code_device checkout .
git -C ../code_device pull
git -C ../code_app clean -df
git -C ../code_app checkout .
git -C ../code_app pull
git -C ../code_lang checkout .
git -C ../code_lang pull
git -C ../code_log checkout .
git -C ../code_log pull
echo "-----------------------------start code_lang build-----------------------------"
./../code_lang/build.sh
echo "-----------------------------start code_log build-----------------------------"
./../code_log/build.sh
echo "-----------------------------start code_device build-----------------------------"
./../code_device/build.sh $sanelibname $dpkgtype
echo "-----------------------------over code_device build-----------------------------"
if [ $? -ne 0 ];then
echo "code_device-------->编译失败"
exit 1
fi
echo "-----------------------------start code_app build-----------------------------"
if [ ${oem:0-2:2} == "sm" ];
then
./../code_app/build.sh ${oem%${oem:0-2:2}*}
else
./../code_app/build.sh $oem
echo ""
fi
echo "-----------------------------over code_app build-----------------------------"
if [ $? -ne 0 ];then
echo "code_app-------->编译失败"
exit 1
fi
}
function getismount()
{
if [ ! -d "/home/samba" ];then
echo $password|sudo -S mkdir -p "/home/samba"
echo $password|sudo -S mount -t cifs //192.168.10.5/huagao /home/samba/ -o username=huagao,password=hg123123
fi
mountpoint -q /home/samba
ismount=$?
if [ $ismount != 0 ];then
echo "$(date):mount is fail!!! and reboot mount"
echo $password|sudo -S mount -t cifs //192.168.10.5/huagao /home/samba/ -o username=huagao,password=hg123123
if [ ! $? ];then
echo "$(date):mount is fail!!!"
exit 1
fi
ismount=$?
else
echo "$(date):mount is succeed"
fi
}
if [ "$cpu" == "x86_64" ];
then
dpkgarch="amd64"
libpath="x86_64-linux-gnu"
elif [ "$cpu" == "aarch64" ];
then
dpkgarch="arm64"
libpath="aarch64-linux-gnu"
elif [ "$cpu" == "mips64" ];
then
dpkgarch="mips64el"
libpath="mips64el-linux-gnu"
elif [ "$cpu" == "loongarch64" ];
then
dpkgarch="loongarch64"
libpath="loongarch64-linux-gnu"
elif [ "$cpu" == "sw_64" ];
then
dpkgarch="sw_64"
libpath="sw_64-linux-gnu"
else
echo "没有已知架构"
exit 1
fi
if [ "$syspath" == "uos" ] || [ "$sys" == "UnionTech" ];
then
syspath="uos"
elif [ "$syspath" == "kylin" ] && [ "$sys" == "UnionTech" ];
then
syspath="uos"
elif [ "$syspath" == "" ] && [ "$sys" == "UnionTech" ];
then
syspath="uos"
elif [ "$syspath" == "kylin" ] || [ "$sys" == "Kylin" ];
then
syspath="kylin"
elif [ "$syspath" == "uos" ] && [ "$sys" == "Kylin" ];
then
syspath="kylin"
elif [ "$syspath" == "" ] && [ "$sys" == "Kylin" ];
then
syspath="kylin"
else
syspath="kylin"
fi
echo $syspath
if [ $dpkgtype == "uos" ];
then
if [ "$oem" == "hw" ];
then
dpkgpath="com.hanvonchina.hanvonscan"
OEMHELPNAME="HanvonScan"
elif [ "$oem" == "lsc" ];
then
dpkgpath="com.lanxumchina.lanxumscan"
OEMHELPNAME="LanxumScan"
elif [ "$oem" == "hg" ];
then
dpkgpath="com.huagaochina.huagoscan"
elif [ "$oem" == "hgtool" ];
then
dpkgpath="com.huagaochina.huagoscantool"
elif [ "$oem" == "cts" ];
then
dpkgpath="com.cumtennchina.cumtennscan"
OEMHELPNAME="CumtennScan"
elif [ "$oem" == "zj" ];
then
dpkgpath="com.microtekchina.microtekscan-ex"
OEMHELPNAME="MicrotekScan"
elif [ "$oem" == "zg" ];
then
dpkgpath="com.unischina.uniscan"
OEMHELPNAME="UniScan"
elif [ "$oem" == "dl" ];
then
dpkgpath="com.delichina.deliscan"
OEMHELPNAME="DeliScan"
elif [ "$oem" == "neu" ];
then
dpkgpath="com.neutralchina.neuscan"
OEMHELPNAME="NeuScan"
fi
else
if [ "$oem" == "hw" ] ;
then
dpkgpath="scanner-driver-hanvon"
OEMHELPNAME="HanvonScan"
elif [ "$oem" == "lsc" ];
then
dpkgpath="scanner-driver-lanxum"
OEMHELPNAME="LanxumScan"
elif [ "$oem" == "hg" ];
then
dpkgpath="scanner-driver-huagao"
elif [ "$oem" == "cts" ];
then
dpkgpath="scanner-driver-cumtenn"
OEMHELPNAME="CumtennScan"
elif [ "$oem" == "zj" ];
then
dpkgpath="scanner-driver-microtek-ex"
OEMHELPNAME="MicrotekScan"
elif [ "$oem" == "zg" ];
then
dpkgpath="scanner-driver-unis"
OEMHELPNAME="UniScan"
elif [ "$oem" == "dl" ];
then
dpkgpath="scanner-driver-deli"
OEMHELPNAME="DeliScan"
elif [ "$oem" == "neu" ];
then
dpkgpath="scanner-driver-neutral"
OEMHELPNAME="NeuScan"
elif [ "$oem" == "hgweb" ];
then
dpkgpath="huagaowebscan"
OEMHELPNAME=""
elif [ "$oem" == "lscweb" ];
then
dpkgpath="lanxumwebscan"
OEMHELPNAME=""
elif [ "$oem" == "hwweb" ];
then
dpkgpath="hanvonwebscan"
OEMHELPNAME=""
elif [ "$oem" == "ctsweb" ];
then
dpkgpath="cumtennwebscan"
OEMHELPNAME=""
elif [ "$oem" == "zjweb" ];
then
dpkgpath="Microtekwebscan"
OEMHELPNAME=""
elif [ "$oem" == "dlweb" ];
then
dpkgpath="deliwebscan"
OEMHELPNAME=""
elif [ "$oem" == "hgso" ];
then
dpkgpath="huagaoscansdk"
elif [ "$oem" == "lscso" ];
then
dpkgpath="lanxumscansdk"
elif [ "$oem" == "hwso" ];
then
dpkgpath="hanvonscansdk"
elif [ "$oem" == "ctsso" ];
then
dpkgpath="cumtennscansdk"
elif [ "$oem" == "zjso" ];
then
dpkgpath="Microtekscansdk"
elif [ "$oem" == "dlso" ];
then
dpkgpath="deliscansdk"
elif [ "$oem" == "lscsm" ];
then
dpkgpath="lanxumscan"
elif [ "$oem" == "hgsm" ];
then
dpkgpath="huagoscan"
elif [ "$oem" == "hgtool" ];
then
dpkgpath="scanner-driver-huagaoscantool"
fi
fi
if [ $OEMHELPNAME != "" ] && [ "$oem" != "hgtool" ]
then
if [ $dpkgtype == "uos" ]
then
mkdir $dpkgtype/$oem/opt/apps/$dpkgpath/entries/help
cp -rf ../code_app/doc/scanner/$OEMHELPNAME"_scanSettings_Help_manual.pdf" $dpkgtype/$oem/opt/apps/$dpkgpath/entries/help
cp -rf ../code_app/doc/scanner/$OEMHELPNAME"_App_Help_manual.pdf" $dpkgtype/$oem/opt/apps/$dpkgpath/entries/help
if [ "$oem" == "zj" ]
then
cp -rf ../code_app/doc/scanner/$OEMHELPNAME"_scanSettings_Help_manual_EN.pdf" $dpkgtype/$oem/opt/apps/$dpkgpath/entries/help
cp -rf ../code_app/doc/scanner/$OEMHELPNAME"_App_Help_manual_EN.pdf" $dpkgtype/$oem/opt/apps/$dpkgpath/entries/help
cp -rf ../code_app/doc/scanner/$OEMHELPNAME"_App_Help_manual_TRADCN.pdf" $dpkgtype/$oem/opt/apps/$dpkgpath/entries/help
cp -rf ../code_app/doc/scanner/$OEMHELPNAME"_App_Help_manual_VN.pdf" $dpkgtype/$oem/opt/apps/$dpkgpath/entries/help
fi
else
mkdir $dpkgtype/$oem/opt/apps/$dpkgpath/doc
cp -rf ../code_app/doc/scanner/$OEMHELPNAME"_scanSettings_Help_manual.pdf" $dpkgtype/$oem/opt/apps/$dpkgpath/doc
cp -rf ../code_app/doc/scanner/$OEMHELPNAME"_App_Help_manual.pdf" $dpkgtype/$oem/opt/apps/$dpkgpath/doc
if [ "$oem" == "zj" ]
then
cp -rf ../code_app/doc/scanner/$OEMHELPNAME"_scanSettings_Help_manual_EN.pdf" $dpkgtype/$oem/opt/apps/$dpkgpath/doc
cp -rf ../code_app/doc/scanner/$OEMHELPNAME"_App_Help_manual_EN.pdf" $dpkgtype/$oem/opt/apps/$dpkgpath/doc
cp -rf ../code_app/doc/scanner/$OEMHELPNAME"_App_Help_manual_TRADCN.pdf" $dpkgtype/$oem/opt/apps/$dpkgpath/doc
cp -rf ../code_app/doc/scanner/$OEMHELPNAME"_App_Help_manual_VN.pdf" $dpkgtype/$oem/opt/apps/$dpkgpath/doc
fi
fi
fi
if [ "$oem" == "lsc" ] \
|| [ "$oem" == "lscweb" ] \
|| [ "$oem" == "lscso" ] \
|| [ "$oem" == "lscsm" ];
then
ver3=14
elif [ "$oem" == "hw" ] \
|| [ "$oem" == "hwweb" ] \
|| [ "$oem" == "hwso" ];
then
ver3=16
elif [ "$oem" == "cts" ] \
|| [ "$oem" == "ctsweb" ] \
|| [ "$oem" == "ctsso" ];
then
ver3=18
elif [ "$oem" == "zj" ]\
|| [ "$oem" == "zjweb" ]\
|| [ "$oem" == "zjso" ];
then
ver3=20
elif [ "$oem" == "zg" ]\
|| [ "$oem" == "zgweb" ]\
|| [ "$oem" == "zgso" ];
then
ver3=22
elif [ "$oem" == "dl" ]\
|| [ "$oem" == "dlweb" ]\
|| [ "$oem" == "dlso" ];
then
ver3=24
elif [ "$oem" == "neu" ]\
|| [ "$oem" == "neuweb" ]\
|| [ "$oem" == "neuso" ];
then
ver3=26
fi
ver3=$[$ver3 * 10]
if [ "$cpu" == "x86_64" ];
then
ver3=$[$ver3 + 5]
elif [ "$cpu" == "aarch64" ];
then
ver3=$[$ver3 + 2]
elif [ "$cpu" == "mips64" ];
then
ver3=$[$ver3 + 3]
elif [ "$cpu" == "loongarch64" ];
then
ver3=$[$ver3 + 4]
elif [ "$cpu" == "sw_64" ];
then
ver3=$[$ver3 + 7]
fi
ver3=$[$ver3 * 100]
if [ "$dpkgtype" == "uos" ];
then
ver3=$[$ver3 + 20]
elif [ "$dpkgtype" == "kylin" ];
then
ver3=$[$ver3 + 21]
else
# unknown OS, set as linux
ver3=$[$ver3 + 10]
fi
appbuild ########开始进行编译目前只能git 后期可以选择保存本地进行替换
#从 brand.h当中获取版本号
mainverstr=$(cat ../sdk/include/huagao/brand.h |grep VERSION_MAIN)
mainverstr=${mainverstr: -2}
mainverstr=$(echo $mainverstr)
minver=$(cat ../sdk/include/huagao/brand.h |grep VERSION_SUB)
minver=${minver: -2}
minver=$(echo $minver)
ver="$mainverstr.$minver.$ver3.$time2"
echo $minver
echo "3rd version replacing pattern: "${ver3}
echo $dpkgpath
echo $ver
Version="Version: $ver"
Architecture="Architecture: $dpkgarch"
packagename="Package: $dpkgpath"
echo $Architecture $Version
############## 路径以sane根目录为基准
cd ..
##############
##############lsc不替换
if [ "$oem" != "lscsm" ] || [ "$oem" != "hgsm" ];
then
##############进行copy语言包
cp -rf release/lang release/$syspath/$cpu
sed -i "1s/.*/$packagename/g" dpkg/$dpkgtype/$oem/DEBIAN/control
sed -i "2s/.*/$Version/g" dpkg/$dpkgtype/$oem/DEBIAN/control
fi
sed -i "3s/.*/$Architecture/g" dpkg/$dpkgtype/$oem/DEBIAN/control
rm dpkg/$dpkgtype/$oem/etc/udev/rules.d/*
cp dpkg/60-sane.rules dpkg/$dpkgtype/$oem/etc/udev/rules.d/60-"$oem"sane.rules
if [ "${oem:0-2:2}" != "so" ] && [ "${oem:0-3:3}" != "web" ] && [ "${oem:0-4:4}" != "tool" ];
then
#创建sane的文件目录 //必须保证这一步成功
rm -rf dpkg/$dpkgtype/$oem/usr/lib/*
if [ $? -ne 0 ];then
echo "del sane file fail"
exit 1
fi
if [ ! -d dpkg/$dpkgtype/$oem/usr/lib/$libpath ];
then
mkdir -p dpkg/$dpkgtype/$oem/usr/lib/$libpath/sane
if [ $? -ne 0 ];then
echo "mkdir sane file fail !!! --->mkdir path dpkg/$dpkgtype/$oem/usr/lib/$libpath/sane"
exit 1
fi
cp release/$syspath/$cpu/libsane-"$sanelibname"sane.so dpkg/$dpkgtype/$oem/usr/lib/$libpath/sane/libsane-"$sanelibname"sane.so.1
if [ $? -ne 0 ];then
echo "copy libsane file fail sane name is :libsane-"$sanelibname"sane.so!!!"
exit 1
fi
#kylin sp1有其他路径无法区分sp1 还是sp版本 ,所以全部进行拷贝即可 kylin mips 特殊处理
if [ "$cpu" == "mips64" ];
then
mkdir -p dpkg/$dpkgtype/$oem/usr/lib/"mips64el-linux-gnuabi64"/sane
if [ $? -ne 0 ];then
echo "mips64el mkdir sane file fail !!!"
exit 1
fi
cp release/$syspath/$cpu/libsane-"$sanelibname"sane.so dpkg/$dpkgtype/$oem/usr/lib/"mips64el-linux-gnuabi64"/sane/libsane-"$sanelibname"sane.so.1
if [ $? -ne 0 ];then
echo "copy libsane file fail sane name is :libsane-"$sanelibname"sane.so!!!"
exit 1
fi
fi
else
echo "del sane file fail"
exit 1
fi
fi
if [ "$oem" == "lscweb" ] || [ "$oem" == "hwweb" ] || [ "$oem" == "hgweb" ] || [ "$oem" == "ctsweb" ] || [ "$oem" == "zjweb" ] || [ "$oem" == "dlweb" ];
then
cp -rf release/$syspath/$cpu/* dpkg/$dpkgtype/$oem/opt/$dpkgpath/bin
elif [ "$oem" == "hgso" ] || [ "$oem" == "hwso" ] || [ "$oem" == "lscso" ] || [ "$oem" == "ctsso" ] || [ "$oem" == "zjso" ] || [ "$oem" == "dlso" ];
then
cp -rf release/$syspath/$cpu/* dpkg/$dpkgtype/$oem/opt/$dpkgpath/lib
cp sdk/include/scannerlib/* dpkg/$dpkgtype/$oem/opt/$dpkgpath/include
elif [ "$oem" == "lscsm" ] || [ "$oem" == "hgsm" ];
then
cp -rf release/$syspath/$cpu/* dpkg/$dpkgtype/$oem/opt/$dpkgpath
else
#暂时只拷贝立思辰
if [ "$oem" == "lsc" ];
then
if [ ! -d "dpkg/$syspath/$oem/usr/local/lib/sane/" ];
then
mkdir -p "dpkg/$syspath/$oem/usr/local/lib/sane/"
fi
cp release/$syspath/$cpu/libsane-"$sanelibname"sane.so dpkg/$dpkgtype/$oem/usr/local/lib/sane/libsane-"$sanelibname"sane.so.1
fi
savedpkgpath="dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath"
echo $dpkgpath
if [ "$dpkgtype" == "uos" ];
then
#替换uos里面的info 虽然不晓得有啥用
appid='"appid":''"'$dpkgpath'"'','
InfoArch='"arch":[''"'$dpkgarch'"']','
version='"version":''"'$ver'"'','
name='"name":''"'$oem'"'','
sed -i "5s/.*/ $InfoArch/g" "$savedpkgpath/info"
sed -i "2s/.*/ $appid/g" "dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/info"
sed -i "4s/.*/ $version/g" "dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/info"
sed -i "3s/.*/ $name/g" "dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/info"
cp -rf release/$syspath/$cpu/* dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/files/lib
if [ "$oem" == "hg" ] || [ "$oem" == "zg" ];
then
mv dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/files/lib/*App dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/files/bin
fi
if [ "$oem" == "dl" ];
then
mv dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/files/lib/"DELI SCAN" dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/files/bin/DELISCAN
else
mv dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/files/lib/*Scan dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/files/bin/
fi
if [ "$oem" == "zj" ];
then
mkdir dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/files/lib/settings
cp -rf release/win/x86/Release/microtek-settings/0439.hsc dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/files/lib/settings/0439.hsc
fi
if [ $? != 0 ];
then
echo "-----------------cp fail-----------------"
exit 1
fi
else
if [ "$oem" == "hgtool" ];
then
cp -rf release/$syspath/$cpu/* dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/bin
else
cp -rf release/$syspath/$cpu/* dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/lib
if [ "$oem" == "hg" ] || [ "$oem" == "zg" ];
then
mv dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/lib/*App dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/bin
elif [ "$oem" == "dl" ];
then
mv dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/lib/"DELI SCAN" dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/bin/DELISCAN
elif [ "$oem" == "zj" ];
then
mkdir dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/lib/settings
cp -rf release/win/x86/Release/microtek-settings/0439.hsc dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/lib/settings/0439.hsc
else
mv dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/lib/*Scan dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath/bin
fi
fi
if [ $? != 0 ];
then
echo "-----------------cp fail-----------------"
exit 1
fi
fi
fi
chmod 755 dpkg -R
chmod 755 backup -R
if [ -d "backup/$dpkgtype/$oem/$mainverstr.$minver.$time2" ];
then
rm -rf "backup/$dpkgtype/$oem/$mainverstr.$minver.$time2"
fi
if [ ! -d "backup/$dpkgtype/$oem/$mainverstr.$minver.$time2" ];
then
mkdir -p "backup/$dpkgtype/$oem/$mainverstr.$minver.$time2"
fi
cp -rf dpkg/$dpkgtype/$oem/* backup/$dpkgtype/$oem/$mainverstr.$minver.$time2
if [ ! -d "backup/dpkg/$sanelibname/$mainverstr.$minver.$time2/$dpkgtype" ];
then
mkdir -p "backup/dpkg/$sanelibname/$mainverstr.$minver.$time2/$dpkgtype/"
fi
dpkg -b backup/$dpkgtype/$oem/$mainverstr.$minver.$time2 backup/dpkg/$sanelibname/$mainverstr.$minver.$time2/$dpkgtype/$dpkgpath"_"$ver"_"$dpkgarch.deb
getismount
if [ $ismount == 0 ];
then
if [ -d "$FIND_FILE" ];
then
echo "$(date):mount is succeed and cp dpkg"
#echo $password|sudo -S cp -rf backup/dpkg/$sanelibname $FIND_FILE/
fi
fi