From b49b1f988e8a5d3b55e7e83efb25b25ce6e8ae3d Mon Sep 17 00:00:00 2001 From: modehua Date: Wed, 28 Sep 2022 16:54:15 +0800 Subject: [PATCH] shell --- build.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/build.sh b/build.sh index 369da3a..0d5be85 100755 --- a/build.sh +++ b/build.sh @@ -126,7 +126,6 @@ git pull cd ../code_device git checkout . git pull -echo "222222222222222222222222222:$oem" if [ "$oem" == "hgso" ] ;then ./build.sh hg @@ -269,20 +268,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