#!/bin/bash # this script rebuilds the bookmarks files. it requires the variables: # WEB_DIR: points at the root of the web hierarchy. export GRUNTOSE_DIR=$WEB_DIR/gruntose.com rootname=~/generated suffix=.html norm_add=_marks js_add=_js_tree_marks newmarx=${rootname}_links.csv genlinx=$rootname$norm_add$suffix genlinx_js=$rootname$js_add$suffix if [ -f $genlinx ]; then rm $genlinx; fi if [ -f $newmarx ]; then rm $newmarx; fi if [ -f $genlinx_js ]; then rm $genlinx_js; fi $REPOSITORY_DIR/exe/marks_sorter -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -o $newmarx if [ $? != 0 ]; then echo error during sorting of the bookmarks. exit 1 fi $REPOSITORY_DIR/exe/marks_maker -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -t $GRUNTOSE_DIR/Info/Twain/marks_template.html -o $genlinx if [ $? != 0 ]; then echo error during creation of the normal web page of bookmarks. exit 1 fi $REPOSITORY_DIR/exe/marks_maker_js -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -t $GRUNTOSE_DIR/Info/Twain/js_template.html -o $genlinx_js if [ $? != 0 ]; then echo error during creation of the javascript bookmark page. exit 1 fi \mv -f $genlinx $genlinx_js $GRUNTOSE_DIR/Info/Twain \mv -f $newmarx $TMP