2016-03-15 17:36:59 -05:00
|
|
|
#!/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 {
|
2016-05-04 17:05:19 -05:00
|
|
|
|
2016-03-15 17:36:59 -05:00
|
|
|
if [ ! -d "$SITE_DIR" ]; then
|
|
|
|
echo "checking out"
|
|
|
|
cd ./scripts
|
2016-05-04 17:10:41 -05:00
|
|
|
./git/clone.sh --repository="ionic-site" \
|
2016-03-15 17:36:59 -05:00
|
|
|
--directory="$SITE_DIR" \
|
|
|
|
--branch="master"
|
2016-10-27 19:18:29 -04:00
|
|
|
cd $SITE_DIR
|
|
|
|
ls -al
|
2016-03-15 17:36:59 -05:00
|
|
|
else
|
|
|
|
echo "using existing"
|
|
|
|
cd $SITE_DIR
|
|
|
|
git reset --hard
|
|
|
|
git pull origin master
|
|
|
|
fi
|
2016-10-27 19:18:29 -04:00
|
|
|
|
2017-03-29 11:19:31 -05:00
|
|
|
git rm -rf content/docs/native/*/ || true
|
2016-10-27 19:18:29 -04:00
|
|
|
|
2016-03-15 17:36:59 -05:00
|
|
|
}
|
|
|
|
|
2019-01-23 07:58:54 +01:00
|
|
|
source $(dirname $0)/utils.inc.sh
|