sonist-gtk/build.sh

24 lines
410 B
Bash
Raw Normal View History

2023-08-25 19:34:32 +08:00
#!/bin/bash
if [ -d unpack ]; then
sudo rm -rf unpack
fi
2023-09-05 10:48:45 +08:00
version="1.0.5"
2023-08-26 22:34:17 +08:00
2023-08-25 19:34:32 +08:00
mkdir -p unpack/DEBIAN
cp debian/control unpack/DEBIAN/
cp -r usr unpack/
cd unpack
2023-09-05 15:01:19 +08:00
find usr -type f | xargs md5sum > DEBIAN/md5sums
_size=$(du -d 0 usr | cut -f1)
sed -i "s/{{size}}/${_size}/" DEBIAN/control
sed -i "s/{{version}}/${version}/" DEBIAN/control
2023-08-25 19:34:32 +08:00
cd ..
2023-08-26 22:34:17 +08:00
dpkg-deb -b unpack/ "sonist-${version}.deb"
2023-08-25 19:34:32 +08:00
2023-08-26 22:34:17 +08:00
sudo rm -rf unpack