awesome-cordova-plugins/scripts/docs/prepare.sh
Ibrahim Hadeed 970eb755b6 chore(scripts): clean old docs before processing
This should clean the old docs before processing the new ones, to remove any old directories.
2016-10-22 13:17:44 -04:00

37 lines
603 B
Bash
Executable File

#!/bin/bash
echo "##### "
echo "##### prepare.sh"
echo "#####"
function init {
cd ..
SITE_PATH=$(readJsonProp "config.json" "sitePath")
cd ..
export IONIC_DIR=$PWD
SITE_DIR=$IONIC_DIR/$SITE_PATH
}
function run {
if [ ! -d "$SITE_DIR" ]; then
echo "checking out"
cd ./scripts
./git/clone.sh --repository="ionic-site" \
--directory="$SITE_DIR" \
--branch="master"
ls -al $SITE_DIR
else
echo "using existing"
cd $SITE_DIR
git reset --hard
git pull origin master
fi
git rm -rf docs/v2/native/*
}
source $(dirname $0)/../utils.inc.sh