This commit is contained in:
modehua 2022-09-28 16:41:07 +08:00
parent c415604592
commit 5298a885f3
1 changed files with 13 additions and 12 deletions

View File

@ -269,20 +269,21 @@ if [ ! -d "backup/$syspath/$oem/$ver" ]; then
fi
cp -rf dpkg/$syspath/$oem/* backup/$syspath/$oem/$ver
if [ "$oem" == "hg" ] || [ "$oem" == "lsc" ] || [ "$oem" == "hw" ];then
if [ ! -d "backup/dpkg/$time2/$dpkgtype" ];then
mkdir -p backup/dpkg/$time2/$dpkgtype
path=""
if [ "$oem" == "hg" ] || [ "$oem" == "hgweb" ] || [ "$oem" == "hgso" ];then
dpkgtype="hg"
if [ ! -d "backup/dpkg/$mainverstr.$minver.$time2/$dpkgtype" ];then
mkdir -p backup/dpkg/$mainverstr.$minver.$time2/$dpkgtype/
fi
elif [ "$oem" == "hgweb" ] || [ "$oem" == "lscweb" ] || [ "$oem" == "hwweb" ];then
dpkgtype="web"
if [ ! -d "backup/dpkg/$time2/$dpkgtype" ];then
mkdir -p backup/dpkg/$time2/$dpkgtype
elif [ "$oem" == "lsc" ] || [ "$oem" == "lscweb" ] || [ "$oem" == "lscso" ];then
dpkgtype="lsc"
if [ ! -d "backup/dpkg/$mainverstr.$minver.$time2/$dpkgtype" ];then
mkdir -p backup/dpkg/$mainverstr.$minver.$time2/$dpkgtype/
fi
else
dpkgtype="sdk"
if [ ! -d "backup/dpkg/$time2/$dpkgtype" ];then
mkdir -p backup/dpkg/$time2/$dpkgtype
dpkgtype="hw"
if [ ! -d "backup/dpkg/$mainverstr.$minver.$time2/$dpkgtype" ];then
mkdir -p backup/dpkg/$mainverstr.$minver.$time2/$dpkgtype/
fi
fi
dpkg -b backup/$syspath/$oem/$ver backup/dpkg/$time2/$dpkgtype/$oem/$dpkgpath"_"$ver"_"$dpkgarch.deb
dpkg -b backup/$syspath/$oem/$ver backup/dpkg/$mainverstr.$minver.$time2/$dpkgtype/$dpkgpath"_"$ver"_"$dpkgarch.deb