2014-08-20 14:53:58 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
WHERE=$( cd $(dirname $0) ; pwd -P )
|
|
|
|
|
|
|
|
|
|
# default configs
|
|
|
|
|
if [[ -e "$WHERE/CONFIG" ]]; then
|
|
|
|
|
source $WHERE/CONFIG
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
OPTIND=1 #reset getopts
|
|
|
|
|
|
|
|
|
|
while getopts :b: opts; do
|
|
|
|
|
case $opts in
|
|
|
|
|
b)
|
|
|
|
|
BIB=$OPTARG
|
|
|
|
|
;;
|
|
|
|
|
?)
|
|
|
|
|
echo "invalid option -$OPTARG";
|
|
|
|
|
exit;
|
|
|
|
|
;;
|
|
|
|
|
:)
|
|
|
|
|
echo "option -$OPTARG requires an argument";
|
|
|
|
|
exit;
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
shift $((OPTIND-1))
|
|
|
|
|
|
|
|
|
|
# bibliography exists?
|
|
|
|
|
if [[ -z "$BIB" ]]; then
|
|
|
|
|
echo "No bibliography"
|
|
|
|
|
exit;
|
|
|
|
|
fi
|
|
|
|
|
|
2016-03-14 15:47:30 +01:00
|
|
|
./parse/refactorbib.py -i $BIB
|
|
|
|
|
#node $BIBLIOGRAPHE_PATH/refactorbib.js --data $BIB --index --print
|