From 3f24eaa185bc57b99bf126473b81d075437ec0aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Mon, 8 Jun 2015 16:43:03 +0200 Subject: [PATCH] --- specgen.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ upload.sh | 24 ++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 specgen.sh create mode 100644 upload.sh diff --git a/specgen.sh b/specgen.sh new file mode 100644 index 0000000..5b42993 --- /dev/null +++ b/specgen.sh @@ -0,0 +1,42 @@ +#!/bin/bash +if [ $# -lt 1 ] + then + ONTO=onyx + else + ONTO=$1 +fi +if [ $# -lt 2 ] + then + VERSION=latest + else + VERSION=$2 +fi +if [ $# -lt 3 ] + then + DIR=~/Doctorado/Ontologies/Onyx + else + DIR=$3 +fi +if [ $# -lt 4 ] + then + NS=http://www.gsi.dit.upm.es/ontologies/$ONTO/ns# + else + NS=$4 +fi + +SPECPATH=~/Doctorado/tools/specgen6 + +echo "Generating docs for $ONTO from: $DIR" +echo "Namespace: $NS" + +cp -r $DIR/spec $DIR/spec_backup +rm -rf $VERSION/ +mkdir $DIR/spec/$VERSION +python $SPECPATH/specgen6.py --indir=$DIR --ns=$NS --prefix=$ONTO --ontofile=$ONTO.owl --outdir=$DIR/spec/$VERSION --templatedir=$DIR --outfile=index.html +cd $DIR/spec +rm index.html ns $ONTO.owl +ln -s $VERSION/index.html . +ln -s $VERSION/$ONTO.owl $ONTO.owl +ln -s $VERSION/$ONTO.owl ns +ln -s ../img $VERSION/img +ln -s ../style.css $VERSION/style.css \ No newline at end of file diff --git a/upload.sh b/upload.sh new file mode 100644 index 0000000..45205f9 --- /dev/null +++ b/upload.sh @@ -0,0 +1,24 @@ +#!/bin/bash +if [ $# -lt 1 ] + then + echo "Please, specify an ontology" + return + else + ONTO=$1 +fi +if [ $# -lt 2 ] + then + DIR=~/Doctorado/Ontologies/$ONTO/spec/ + else + DIR=$2 +fi + +if [ $# -lt 3 ] + then + REMOTE=gsi-web@web-home.dit.upm.es:lib/www/gsi/ontologies/$ONTO/ + else + REMOTE=$3 +fi + +echo "Uploading to $REMOTE" +rsync -r --links --copy-unsafe-links $DIR $REMOTE \ No newline at end of file