#!/bin/sh

VSQLITE_CURRENT=0
VSQLITE_REVISION=3
VSQLITE_AGE=0

VSQLITE_LIBRARY=libvsqlite++.so
VSQLITE_CURRENT_LIBRARY=$VSQLITE_LIBRARY.$VSQLITE_CURRENT
VSQLITE_FULL_LIBRARY=$VSQLITE_CURRENT_LIBRARY.$VSQLITE_REVISION.$VSQLITE_AGE

SOURCE="${BASH_SOURCE[0]}"
DIR="$( dirname "$SOURCE" )"
while [ -h "$SOURCE" ]
do 
  SOURCE="$(readlink "$SOURCE")"
  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
  DIR="$( cd -P "$( dirname "$SOURCE"  )" && pwd )"
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

mv $VSQLITE_LIBRARY $VSQLITE_FULL_LIBRARY
ln -s $VSQLITE_FULL_LIBRARY $VSQLITE_CURRENT_LIBRARY
ln -s $VSQLITE_FULL_LIBRARY $VSQLITE_LIBRARY

