rofi-pkexec/build.sh

26 lines
450 B
Bash
Raw Permalink Normal View History

2024-12-02 17:16:13 +08:00
#!/bin/bash
if [ -d unpack ]; then
sudo rm -rf unpack
fi
2024-12-02 17:17:54 +08:00
version="1.0.3-1"
2024-12-02 17:16:13 +08:00
mkdir -p unpack/DEBIAN
cp debian/control unpack/DEBIAN/
cp -r usr unpack/
cd unpack
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
cd ..
sudo chown -R root:root unpack/
dpkg-deb -b unpack/ "rofi-pkexec_${version}.deb"
sudo rm -rf unpack