Skip to content

Commit

Permalink
[ DEP ]: Modify docs.sh to pull project directly in case of nexus-se-…
Browse files Browse the repository at this point in the history
…docs
  • Loading branch information
a1eksb committed Jul 11, 2024
1 parent 875035f commit 259c719
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@ update() {

repo_name=$(echo ${repos[i]} | awk -F'/' '{print $NF}' | awk -F'.' '{print $1}')

if [ "$repo_name" = "nexus-se-docs" ]; then
repo_name="docs"
fi
if [ "$repo_name" = "nexus-se-docs" ]; then
repo_name="docs"
echo "Pulling changes for self"
git pull
continue
fi



if [ ! -d "projects/$repo_name" ]; then
echo -e "\033[34mCloning repository ${repos[i]}...\033[0m"
Expand All @@ -53,16 +58,16 @@ update() {
mkdir -p $root_dir/docs/docs/$repo_name
fi

find $root_dir/projects/$repo_name/docs/docs/ \
-mindepth 1 \
-maxdepth 1 \
-type d \
! \( -name assets -o -name stylesheets \) |
while read -r directory; do
dest_dir=$root_dir/docs/docs/$repo_name/$(basename "$directory")
mkdir -p "$dest_dir"
cp -a "$directory/"* "$dest_dir"
done
find $root_dir/projects/$repo_name/docs/docs/ \
-mindepth 1 \
-maxdepth 1 \
-type d \
! \( -name assets -o -name stylesheets \) |
while read -r directory; do
dest_dir=$root_dir/docs/docs/$repo_name/$(basename "$directory")
mkdir -p "$dest_dir"
cp -a "$directory/"* "$dest_dir"
done


if [ "$repo_name" != "docs" ]; then
Expand Down

0 comments on commit 259c719

Please sign in to comment.