Tamarin/hooks/prebuild/debian/complete-project-db

17 lines
492 B
Bash
Executable File

#!/usr/bin/env bash
cd src
if [ ! -f debian/control ]; then
tamarin_error "No debian/control file found !"
exit 1
fi
package_name=$(sed -n 's/^Source:[ \t]*\(.*\)$/\1/p' debian/control | tr -d '[:space:]')
project_name=$(tamarin_db get project_name)
if [ "${package_name}" != "${project_name}" ]; then
tamarin_warn "The project's name \"${project_name}\" differs from the package one (\"${package_name}\"). Using package's one..."
tamarin_db set project_name "${package_name}"
fi