1
0
mirror of https://github.com/balkian/gists.git synced 2024-11-24 02:12:29 +00:00
This commit is contained in:
J. Fernando Sánchez 2015-06-08 16:43:03 +02:00
commit 3f24eaa185
2 changed files with 66 additions and 0 deletions

42
specgen.sh Normal file
View File

@ -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

24
upload.sh Normal file
View File

@ -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