Skip to content

Commit

Permalink
revert the script
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle committed Sep 22, 2023
1 parent 2abe302 commit d386b6b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions sync_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ for version in "${VERSIONS[@]}"; do
echo "Branch $branch exists, continuing..."
fi

# build documentation
cd docs && sh ./pre.sh && cd ..

# Find all Markdown files in the 'docs' directory
if [ "$version" == "main" ]; then # update for 0.51
# main has a different strucutre then versions
Expand Down Expand Up @@ -97,17 +94,17 @@ for version in "${VERSIONS[@]}"; do
# Replace the local file with the remote file if differences are found
echo "Differences found for $local_file and $remote_file. Replacing $local_file with remote file..."
if [ "$version" == "main" ]; then
cp -r "./cosmos-sdk/$remote_file" "$local_file"
cp "./cosmos-sdk/$remote_file" "$local_file"
else
cp -r "./cosmos-sdk/docs/$remote_file" "$local_file"
cp "./cosmos-sdk/docs/$remote_file" "$local_file"
fi
fi
fi
done
done
else
# The file does not exist, so copy the remote file
cp -r "./cosmos-sdk/docs/$remote_file" "$local_file"
cp "./cosmos-sdk/docs/$remote_file" "$local_file"
echo "File $local_file created and replaced with ./cosmos-sdk/docs/$remote_file"
fi
done
Expand Down

0 comments on commit d386b6b

Please sign in to comment.