Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/rpm-software-management/createrepo_c.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Mlcoch <tmlcoch@redhat.com>2015-10-20 10:42:43 +0300
committerTomas Mlcoch <tmlcoch@redhat.com>2015-10-20 10:48:03 +0300
commitcd3e1974b60e6847ec40aafc2fae6bb7c5d3eb73 (patch)
tree093c10367c59e2dc8e21ea4f5ec1fb146a17a54a
parentb97ab138c1e7b614a3e98bd6efa99342e840f696 (diff)
Add update_doc.sh script
-rwxr-xr-xupdate_doc.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/update_doc.sh b/update_doc.sh
new file mode 100755
index 0000000..67dd44a
--- /dev/null
+++ b/update_doc.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+REPONAME="createrepo_c"
+GITREPO="https://github.com/Tojaj/createrepo_c.git"
+
+MY_DIR="$( cd "$(dirname "$0")" ; pwd -P )"
+
+pushd "$MY_DIR"
+echo "Generating doc into $MY_DIR"
+
+echo "Pulling changes"
+git pull
+
+mkdir -p "python/" # In the most scenarios this dir would already exist
+mkdir -p "c/" # In the most scenarios this dir would already exist
+
+TMP_DIR=$( mktemp -d )
+echo "Using temporary directory: $TMP_DIR"
+
+pushd "$TMP_DIR"
+git clone --depth 1 --branch master --single-branch "$GITREPO"
+cd "$REPONAME"
+mkdir build
+cd build
+cmake ..
+make
+make doc
+echo "Copying python doc..."
+cp doc/python/html/*.html "$MY_DIR"/python
+cp doc/python/html/*.js "$MY_DIR"/python
+cp -r doc/python/html/_static "$MY_DIR"/python
+echo "Copying C doc..."
+cp -r doc/html/* "$MY_DIR"/c
+popd
+echo "Removing: $TMP_DIR"
+rm -rf "$TMP_DIR"
+
+echo "Successfully finished"
+echo "To push updated doc - commit changes and push them:"
+echo "git commit -a -m \"Documentation update\""
+echo "git push origin gh-pages"
+
+popd