Skip to content

Commit

Permalink
update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Yun Qu committed Jul 21, 2016
1 parent 1a97293 commit bad674b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
# Packages
############

# Windows Thumbnail
############
Thumbs.db
thumbs.db

# Logs and Databases
######################
*.log
Expand Down
18 changes: 12 additions & 6 deletions ubuntu/scripts/update_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

REPO_DIR=/home/xpp/pynq_git
PYNQ_DIR=/usr/local/lib/python3.4/dist-packages/pynq
BACKUP_DIR=/home/xpp/pynq_backup

FINAL_DOCS_DIR=/home/xpp/docs
FINAL_NOTEBOOKS_DIR=/home/xpp/jupyter_notebooks
Expand Down Expand Up @@ -36,21 +37,26 @@ if ! [ $(id -u) = 0 ]; then
exit 1
fi

if [ -d $REPO_DIR ]; then
echo "plesae manually remove ${REPO_DIR} before running this script."
echo "rm -rf ${REPO_DIR}"
if [ -d $REPO_DIR ] || [ -d $BACKUP_DIR ] ; then
echo ""
echo "please manually remove git backup folders before running this script."
echo "rm -rf ${REPO_DIR} ${BACKUP_DIR}"
echo ""
exit 1
fi

echo "1. Build docs"

echo "1. Backing up files into ${BACKUP_DIR}"
mkdir $BACKUP_DIR
cp -r $FINAL_DOCS_DIR $FINAL_NOTEBOOKS_DIR $FINAL_SCRIPTS_DIR $BACKUP_DIR

echo "2. Build docs"
git clone https://github.com/Xilinx/PYNQ $REPO_DIR
cd $REPO_DIR/docs
sphinx-apidoc -f -o ./source $PYNQ_DIR
python3 ipynb_post_processor.py
make clean ; make html

echo "2. Transfer Git files into final filesystem with correct ownership"
echo "3. Transfer Git files into final filesystem with correct ownership"
rm -rf $FINAL_DOCS_DIR/* $FINAL_NOTEBOOKS_DIR/*
cp -r $REPO_DIR/docs/build/html/* $FINAL_DOCS_DIR
cp -r $REPO_DIR/$BOARD/notebooks/* $FINAL_NOTEBOOKS_DIR
Expand Down
3 changes: 1 addition & 2 deletions ubuntu/scripts/update_pynq.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/bash


SCRIPT_NAME=`basename "$0"`
BACKUP_DIR=/home/xpp/pynq_update_backup
BACKUP_DIR=/home/xpp/pynq_backup
REPO_DIR=/home/xpp/pynq_git
PYNQ_DIR=/usr/local/lib/python3.4/dist-packages/pynq

Expand Down

0 comments on commit bad674b

Please sign in to comment.