Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 76 lines (65 sloc) 2.065 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
#! /bin/sh

if [ ! -f .update ]; then
echo "No update found -- exiting"
    exit
else
rm .update
fi

cd /home/tav/silo/ampify
git pull origin master
./environ/startup/yatiblog doc
./environ/startup/yatiblog misc/www
./environ/startup/yatiblog misc/blog

SILO_ROOT_DIRECTORY=/home/tav/silo
WWW_DIRECTORY=/var/www
PLEXNET_ROOT=/home/tav/plexnet

if [ -f ~/.genwebsites.conf ]; then
echo "# Sourcing .genwebsites.conf"
    source ~/.genwebsites.conf
fi

if [ ! "$PLEXNET_INSTALLED" ]; then
source $PLEXNET_ROOT/environ/startup/plexnetenv.sh
fi

AUTHORS=$PLEXNET_ROOT/documentation/credits.txt

_gen_website() {
  SOURCE_PATH=$1
  SITE_DOMAIN=$2
  cd $SOURCE_PATH
  ERROR_PULLING_FROM_GITHUB="true"
  if [ -f .gendate ]; then
PREV_GEN=`head -1 .gendate`
  else
PREV_GEN="None"
  fi
git pull origin master 2> /dev/null && ERROR_PULLING_FROM_GITHUB="false"
  if [ "$ERROR_PULLING_FROM_GITHUB" = "true" ]; then
touch .update
    echo "Error pulling from GitHub for: $SOURCE_PATH"
    return 1
  fi
if [ -f .gendate ]; then
NEW_GEN=`head -1 .gendate`
  else
NEW_GEN="None"
  fi
if [ ! "A$PREV_GEN" = "A$NEW_GEN" ]; then
yatiblog $SOURCE_PATH --authors=$AUTHORS --clean
  fi
if [ "None$3" = "None" ]; then
yatiblog $SOURCE_PATH --authors=$AUTHORS
  else
yatiblog $SOURCE_PATH --authors=$AUTHORS --package=$3
  fi
mkdir -p $WWW_DIRECTORY/$SITE_DOMAIN/htdocs
  mv $WWW_DIRECTORY/$SITE_DOMAIN/htdocs $WWW_DIRECTORY/$SITE_DOMAIN/old
  mv website $WWW_DIRECTORY/$SITE_DOMAIN/htdocs
  cp -r $WWW_DIRECTORY/$SITE_DOMAIN/htdocs website
  rm -rf $WWW_DIRECTORY/$SITE_DOMAIN/old
}

_gen_website "$SILO_ROOT_DIRECTORY/blog" "tav.espians.com"
_gen_website "$PLEXNET_ROOT/documentation/espians" "www.espians.com"

# _gen_website "$SILO_ROOT_DIRECTORY/sofia-blog" "www.turnupthecourage.com"
# _gen_website "$SILO_ROOT_DIRECTORY/beyondthecrunch" "www.beyondthecrunch.com"
# _gen_website "$PLEXNET_ROOT/documentation" "www.plexnet.org" "plexnet"

# cd $WWW_DIRECTORY/release.plexnet.org/htdocs
# git pull origin master 2> /dev/null
Something went wrong with that request. Please try again.