mirror of
https://github.com/balkian/gists.git
synced 2024-11-23 01:52:27 +00:00
Add 'repos/90c0497c0b207812cbbc/' from commit '3c24001f1d275493227a82cf85d178e8f9752e55'
git-subtree-dir: repos/90c0497c0b207812cbbc git-subtree-mainline:3eaae25ed7
git-subtree-split:3c24001f1d
This commit is contained in:
commit
58397e7325
54
repos/90c0497c0b207812cbbc/specgen.sh
Normal file
54
repos/90c0497c0b207812cbbc/specgen.sh
Normal file
@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
if [ $# -lt 1 ]
|
||||
then
|
||||
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
|
||||
FORMAT=owl
|
||||
else
|
||||
FORMAT=$2
|
||||
fi
|
||||
if [ $# -lt 3 ]
|
||||
then
|
||||
VERSION=latest
|
||||
else
|
||||
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=$5
|
||||
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
|
||||
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
|
||||
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.$FORMAT $ONTO.$FORMAT
|
||||
ln -s $VERSION/$ONTO.$FORMAT ns
|
||||
ln -s $VERSION/img img
|
||||
ln -s $VERSION/style.css style.css
|
27
repos/90c0497c0b207812cbbc/upload.sh
Normal file
27
repos/90c0497c0b207812cbbc/upload.sh
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
if [ $# -lt 1 ]
|
||||
then
|
||||
echo "Please, specify an ontology"
|
||||
exit 0
|
||||
else
|
||||
ONTO=$1
|
||||
fi
|
||||
if [ $# -lt 2 ]
|
||||
then
|
||||
DIR=~/Doctorado/Ontologies/$ONTO/spec/
|
||||
else
|
||||
DIR=$2
|
||||
fi
|
||||
|
||||
if [ $# -lt 3 ]
|
||||
then
|
||||
REMOTE=ontologies@gsi.dit.upm.es:$ONTO/
|
||||
else
|
||||
REMOTE=$3
|
||||
fi
|
||||
|
||||
echo "Uploading to $REMOTE"
|
||||
#scp -r $DIR $REMOTE
|
||||
sftp $REMOTE -b <<EOF
|
||||
mput -r $DIR
|
||||
EOF
|
Loading…
Reference in New Issue
Block a user