diff --git a/pmd/etc/generate_release.sh b/pmd/etc/generate_release.sh index f66e0a671b..270d222e53 100644 --- a/pmd/etc/generate_release.sh +++ b/pmd/etc/generate_release.sh @@ -43,21 +43,17 @@ while getopts v:dsh OPT; do esac done +current_dir=$(pwd | sed -e 's/^.*\///') +if [ "${current_dir}" != "etc" ]; then + echo "release script MUST be executed from the 'etc' folder" + exit 3 +fi + if [ -z ${version} ]; then check_dependency "xsltproc" readonly version=$(xsltproc extract_release_number.xslt ../pom.xml | grep VERSION | cut -f2 -d: | sed -e 's/-SNAPSHOT//') fi -check_dependency "ant" -check_dependency "maven" -check_dependency "mvn" - -current_dir=$(pwd | sed -e 's/^.*\///') -if [ "${current_dir}" -ne "etc" ], then - echo "release script MUST be executed from the 'etc' folder" - exit 3 -fi - echo "building release version ${version}" pmd_top_dir="$(mktemp -d)"