mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 08:32:52 +08:00
38 lines
620 B
Bash
Executable File
38 lines
620 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"
|
|
cd $SITE_DIR
|
|
ls -al
|
|
else
|
|
echo "using existing"
|
|
cd $SITE_DIR
|
|
git reset --hard
|
|
git pull origin master
|
|
fi
|
|
|
|
git rm -rf content/docs/native/*/ || true
|
|
|
|
}
|
|
|
|
source $(dirname $0)/../utils.inc.sh
|