Tamarin/hooks/01-fix-project-name-prebuild

17 lines
457 B
Bash
Executable File

#!/usr/bin/env bash
source "${TAMARIN_UTIL}"
if [ ! -f debian/control ]; then
fatal "No debian/control file found !"
fi
package_name=$(grep -E '^Package:' debian/control | awk '{ print $2 }')
project_name=$(get_opt project_name)
if [ "${package_name}" != "${project_name}" ]; then
warn "The project's name '${project_name}' differs from the package one ('${package_name}'). Using package's one..."
set_opt project_name "${package_name}"
exit
fi