Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various bash fixes for generate_javadoc_for_release.sh #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions generate_javadoc_for_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ artifacts+=" org.apache.sling.servlets.annotations:1.1.0"

# checkout tags
for artifact in $artifacts; do
artifact_name=$(echo $artifact | sed 's/:.*//')
artifact_version=$(echo $artifact | sed 's/.*://')
artifact_name="${artifact%%:*}"
artifact_version="${artifact##*:}"
branch_name="${artifact_name}-${artifact_version}"
artifact_dir="sling-${artifact_name}-${artifact_version}"
artifact_repo=$(echo $artifact_name | tr '.' '-')
artifact_repo=$(echo "$artifact_name" | tr '.' '-')
artifact_repo="sling-${artifact_repo}"

# - don't document Slingshot sample
Expand All @@ -41,7 +41,7 @@ for artifact in $artifacts; do
continue;
fi

if [ -d $WORKDIR/$artifact_dir ] ; then
if [ -d $WORKDIR/"$artifact_dir" ] ; then
echo "Not checking out $artifact_dir, already present";
else
if [[ "$artifact_version" == *-SNAPSHOT ]]; then
Expand All @@ -53,11 +53,11 @@ for artifact in $artifacts; do
fi
fi
echo "Exporting $artifact from source control"
git -c advice.detachedHead=false clone https://github.com/apache/${artifact_repo} --branch ${branch_name} ${WORKDIR}/${artifact_dir}
if [ -f patches/$artifact ]; then
git -c advice.detachedHead=false clone https://github.com/apache/"${artifact_repo}" --branch "${branch_name}" ${WORKDIR}/"${artifact_dir}"
if [ -f patches/"$artifact" ]; then
echo "Applying patch"
pushd $WORKDIR/$artifact_dir
patch -p0 < ../../patches/$artifact_dir
pushd $WORKDIR/"$artifact_dir"
patch -p0 < ../../patches/"$artifact_dir"
popd
fi
fi
Expand Down