cp dpkg server

This commit is contained in:
modehua 2022-09-28 17:40:51 +08:00
parent 34c0409784
commit 2c8c42dc8e
1 changed files with 31 additions and 8 deletions

View File

@ -7,6 +7,8 @@ dpkgarch="" #打包时的版本
libname="" #动态库名字
libpath="" #打包时库路径
time2=$(date "+%g%j") #版本控制
ismount=-1 #是否挂载服务器成功 0成功 非0失败
FIND_FILE="/home/samba/dpkg" #服务器存放打包路径 不可修改
dpkgtype="app"
ver3=10
@ -25,6 +27,18 @@ if [ "$oem" != "hg" ] && [ "$oem" != "lsc" ] && [ "$oem" != "hw" ] && [ "$oem" !
exit 1
fi
function getismount()
{
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.100.140/huagao /home/samba/ -o username=huagao,password=hg123123
else
echo "$(date):mount is succeed"
fi
}
if [ "$cpu" == "x86_64" ]; then
dpkgarch="amd64"
libpath="x86_64-linux-gnu"
@ -286,3 +300,12 @@ else
fi
fi
dpkg -b backup/$syspath/$oem/$ver backup/dpkg/$mainverstr.$minver/$time2/$dpkgtype/$dpkgpath"_"$ver"_"$dpkgarch.deb
getismount
if [ $ismount == 0 ];then
if [ -d "$FIND_FILE/$syspath" ];then
cp -rf backup/dpkg/$mainverstr.$minver $FIND_FILE/$syspath
fi
fi