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
|
#!/bin/bash
|
||||||
if [ $# -lt 1 ]
|
if [ $# -lt 1 ]
|
||||||
then
|
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
|
else
|
||||||
ONTO=$1
|
ONTO=$1
|
||||||
fi
|
fi
|
||||||
if [ $# -lt 2 ]
|
if [ $# -lt 2 ]
|
||||||
then
|
then
|
||||||
VERSION=latest
|
FORMAT=owl
|
||||||
else
|
else
|
||||||
VERSION=$2
|
FORMAT=$2
|
||||||
fi
|
fi
|
||||||
if [ $# -lt 3 ]
|
if [ $# -lt 3 ]
|
||||||
then
|
then
|
||||||
DIR=~/Doctorado/Ontologies/Onyx
|
VERSION=latest
|
||||||
else
|
else
|
||||||
DIR=$3
|
VERSION=$3
|
||||||
fi
|
fi
|
||||||
if [ $# -lt 4 ]
|
if [ $# -lt 4 ]
|
||||||
|
then
|
||||||
|
DIR=~/Doctorado/Ontologies/$ONTO
|
||||||
|
else
|
||||||
|
DIR=$4
|
||||||
|
fi
|
||||||
|
if [ $# -lt 5 ]
|
||||||
then
|
then
|
||||||
NS=http://www.gsi.dit.upm.es/ontologies/$ONTO/ns#
|
NS=http://www.gsi.dit.upm.es/ontologies/$ONTO/ns#
|
||||||
else
|
else
|
||||||
NS=$4
|
NS=$5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SPECPATH=~/Doctorado/tools/specgen6
|
SPECPATH=~/Doctorado/tools/specgen6
|
||||||
@ -32,11 +40,15 @@ echo "Namespace: $NS"
|
|||||||
cp -r $DIR/spec $DIR/spec_backup
|
cp -r $DIR/spec $DIR/spec_backup
|
||||||
rm -rf $VERSION/
|
rm -rf $VERSION/
|
||||||
mkdir $DIR/spec/$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
|
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/index.html .
|
||||||
ln -s $VERSION/$ONTO.owl $ONTO.owl
|
ln -s $VERSION/$ONTO.$FORMAT $ONTO.$FORMAT
|
||||||
ln -s $VERSION/$ONTO.owl ns
|
ln -s $VERSION/$ONTO.$FORMAT ns
|
||||||
ln -s ../img $VERSION/img
|
ln -s $VERSION/img img
|
||||||
ln -s ../style.css $VERSION/style.css
|
ln -s $VERSION/style.css style.css
|
@ -2,7 +2,7 @@
|
|||||||
if [ $# -lt 1 ]
|
if [ $# -lt 1 ]
|
||||||
then
|
then
|
||||||
echo "Please, specify an ontology"
|
echo "Please, specify an ontology"
|
||||||
return
|
exit 0
|
||||||
else
|
else
|
||||||
ONTO=$1
|
ONTO=$1
|
||||||
fi
|
fi
|
||||||
@ -15,10 +15,13 @@ fi
|
|||||||
|
|
||||||
if [ $# -lt 3 ]
|
if [ $# -lt 3 ]
|
||||||
then
|
then
|
||||||
REMOTE=gsi-web@web-home.dit.upm.es:lib/www/gsi/ontologies/$ONTO/
|
REMOTE=ontologies@gsi.dit.upm.es:$ONTO/
|
||||||
else
|
else
|
||||||
REMOTE=$3
|
REMOTE=$3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Uploading to $REMOTE"
|
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