mirror of
https://github.com/balkian/gists.git
synced 2024-11-21 17:22:29 +00:00
This commit is contained in:
parent
3f24eaa185
commit
3c24001f1d
36
specgen.sh
36
specgen.sh
@ -1,27 +1,35 @@
|
||||
#!/bin/bash
|
||||
if [ $# -lt 1 ]
|
||||
then
|
||||
ONTO=onyx
|
||||
echo "Usage: $0 <ONTO> <FORMAT> <VERSION> <DIR> <NS>"
|
||||
echo "Example: $0 onto owl latest /tmp/Onto http://example.com/ontologies owl"
|
||||
exit
|
||||
else
|
||||
ONTO=$1
|
||||
fi
|
||||
if [ $# -lt 2 ]
|
||||
then
|
||||
VERSION=latest
|
||||
FORMAT=owl
|
||||
else
|
||||
VERSION=$2
|
||||
FORMAT=$2
|
||||
fi
|
||||
if [ $# -lt 3 ]
|
||||
then
|
||||
DIR=~/Doctorado/Ontologies/Onyx
|
||||
VERSION=latest
|
||||
else
|
||||
DIR=$3
|
||||
VERSION=$3
|
||||
fi
|
||||
if [ $# -lt 4 ]
|
||||
then
|
||||
DIR=~/Doctorado/Ontologies/$ONTO
|
||||
else
|
||||
DIR=$4
|
||||
fi
|
||||
if [ $# -lt 5 ]
|
||||
then
|
||||
NS=http://www.gsi.dit.upm.es/ontologies/$ONTO/ns#
|
||||
else
|
||||
NS=$4
|
||||
NS=$5
|
||||
fi
|
||||
|
||||
SPECPATH=~/Doctorado/tools/specgen6
|
||||
@ -32,11 +40,15 @@ 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
|
||||
python2 $SPECPATH/specgen6.py --indir=$DIR --ns=$NS --prefix=$ONTO --ontofile=$ONTO.$FORMAT --outdir=$DIR/spec/$VERSION --templatedir=$DIR --outfile=index.html
|
||||
cd $DIR/spec
|
||||
rm index.html ns $ONTO.owl
|
||||
cp ../$ONTO.$FORMAT $VERSION/
|
||||
ln -s $ONTO.$FORMAT $VERSION/ns
|
||||
cp -R ../img $VERSION/
|
||||
cp ../style.css $VERSION/
|
||||
rm index.html img style.css ns $ONTO.$FORMAT
|
||||
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
|
||||
ln -s $VERSION/$ONTO.$FORMAT $ONTO.$FORMAT
|
||||
ln -s $VERSION/$ONTO.$FORMAT ns
|
||||
ln -s $VERSION/img img
|
||||
ln -s $VERSION/style.css style.css
|
@ -2,7 +2,7 @@
|
||||
if [ $# -lt 1 ]
|
||||
then
|
||||
echo "Please, specify an ontology"
|
||||
return
|
||||
exit 0
|
||||
else
|
||||
ONTO=$1
|
||||
fi
|
||||
@ -15,10 +15,13 @@ fi
|
||||
|
||||
if [ $# -lt 3 ]
|
||||
then
|
||||
REMOTE=gsi-web@web-home.dit.upm.es:lib/www/gsi/ontologies/$ONTO/
|
||||
REMOTE=ontologies@gsi.dit.upm.es:$ONTO/
|
||||
else
|
||||
REMOTE=$3
|
||||
fi
|
||||
|
||||
echo "Uploading to $REMOTE"
|
||||
rsync -r --links --copy-unsafe-links $DIR $REMOTE
|
||||
#scp -r $DIR $REMOTE
|
||||
sftp $REMOTE -b <<EOF
|
||||
mput -r $DIR
|
||||
EOF
|
Loading…
Reference in New Issue
Block a user