deep-wine-runner/builddeb/ChangeDebVersion.sh

12 lines
584 B
Bash
Raw Normal View History

2023-11-12 10:20:11 +08:00
#!/bin/bash
# 读取程序版本号
cd `dirname $0`
export PROGRAMVERSION=`python3 GetProgramVersion.py`
export SIZE=`du /tmp/spark-deepin-wine-runner-builder/ | tail -n1 | awk '{print $1}'`
2024-02-02 13:49:01 +08:00
if [[ -f /tmp/spark-deepin-wine-runner-builder/DEBIAN/control ]]; then
sed -i "s%@@VERSION@@%$PROGRAMVERSION%g" /tmp/spark-deepin-wine-runner-builder/DEBIAN/control
sed -i "s%@@SIZE@@%$SIZE%g" /tmp/spark-deepin-wine-runner-builder/DEBIAN/control
fi
if [[ -f /tmp/spark-deepin-wine-runner.spec ]]; then
sed -i "s%@@VERSION@@%$PROGRAMVERSION%g" /tmp/spark-deepin-wine-runner.spec
fi