mkdpkg.sh 563 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. if [ "$#" -lt 1 ]; then
  2. echo "请输入主版本好,比如1.1"
  3. echo "$1"
  4. exit
  5. fi
  6. sysarch=$(dpkg --print-architecture)
  7. echo "system aarchitecture is "$sysarch
  8. debname="adciv-"$1"."$(date +%Y%m%d%H%M%S)"-"$sysarch".deb"
  9. echo $debname
  10. cd ../../
  11. cp -r ./dpkgtp/adciv ./deploy
  12. cp -r ./deploy/app/* ./deploy/adciv/opt/catarc/adc/adciv/
  13. sed -i "s|VVVVVV|"$1"."$(date +%Y%m%d%H%M%S)"|g" ./deploy/adciv/DEBIAN/control
  14. sed -i "s|AAAAAA|$sysarch|g" ./deploy/adciv/DEBIAN/control
  15. cd ./deploy
  16. dpkg -b adciv ./deb/$debname
  17. rm -r adciv
  18. echo " done!"