0
현재 디렉토리의 하위 디렉토리에 모든 maven 프로젝트를 빌드하려고합니다. 내 셸 스크립트는 파일이 존재하는지 여부에 관계없이 pom 파일이 발견되었다고 말합니다. 내가 잘못된 일을하고 있는지 확실하지 않습니다. 누군가 도움을 청할 수 있습니까?쉘 스크립트를 사용하여 현재 디렉토리에서 pom.xml 찾기
내 쉘 스크립트는 아무것도 찾을 수없는 경우에도,
#!/bin/bash
#############################################################
#Simple script to build all project in the current directory
#############################################################
dirlist=$(find $1 -mindepth 1 -maxdepth 1 -type d)
for dir in $dirlist
do
(
cd $dir
echo "############################################################################"
echo "inside directory: " $dir
echo "############################################################################"
git checkout development
git pull
if find . -maxdepth 1 -type f -name "pom.xml" # <- this is always true#
then
echo "========== Pom file exists to going for building ========= "
mvn clean install -DskipTests=true
fi
)
done