projman/debian/build-deb-projman.sh
svk 4f8e7e306d
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 4s
Обновить debian/build-deb-projman.sh
2024-06-26 16:22:29 +03:00

28 lines
643 B
Bash
Executable File

#!/bin/bash
cd ../
VERSION=$(grep Version projman.tcl | grep -oE '\b[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}\b')
RELEASE=$(grep Release projman.tcl | grep -oE '[0-9A-Za-z]+$')
BUILD_DATE=$(date +%d%m%Y%H%M%S)
TXT="# Build: ${BUILD_DATE}"
echo "$VERSION, $RELEASE, $BUILD_DATE"
sed -i "/# Build:.*/c$TXT" projman.tcl
cp projman.tcl projman
sed -i "s+^set\ dir(lib)+set\ dir(lib)\ /usr/share/projman/lib ;#+g" projman
sed -i "s+\[pwd\]+/usr/share/projman+g" projman
tar czf ../projman_${VERSION}.orig.tar.gz .
dpkg-buildpackage -d
#cp ../projman_${VERSION}-${RELEASE}_amd64.deb /files/
rm -v projman
rm -r -v debian/{projman,.debhelper}