decided it is actually nice to see gen marks
[feisty_meow.git] / scripts / marks / create_marks.sh
1 #!/bin/bash
2
3 # this script rebuilds the bookmarks files.  it requires the variables:
4 #     WEBBED_SITES: points at the root of the web hierarchy.
5
6 export GRUNTOSE_DIR=$WEBBED_SITES/gruntose.com
7
8 rootname=$HOME/generated
9 suffix=.html
10 norm_add=_marks
11 js_add=_js_tree_marks
12 moz_add=_moz_bookmarks
13
14 newmarx=${rootname}_links.csv 
15 genlinx=$rootname$norm_add$suffix
16 genlinx_js=$rootname$js_add$suffix
17 genlinx_moz=$rootname$moz_add$suffix
18
19 if [ -f $genlinx ]; then rm $genlinx; fi
20 if [ -f $newmarx ]; then rm $newmarx; fi
21 if [ -f $genlinx_js ]; then rm $genlinx_js; fi
22 if [ -f $genlinx_moz ]; then rm $genlinx_moz; fi
23
24 $RUNTIME_PATH/binaries/marks_sorter -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -o $newmarx
25 if [ $? != 0 ]; then
26   echo error during sorting of the bookmarks.
27   exit 1
28 fi
29
30 $RUNTIME_PATH/binaries/marks_maker -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -t $GRUNTOSE_DIR/Info/Twain/marks_template.html -o $genlinx -s human
31 if [ $? != 0 ]; then
32   echo error during creation of the normal web page of bookmarks.
33   exit 1
34 fi
35
36 $RUNTIME_PATH/binaries/marks_maker -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -t $GRUNTOSE_DIR/Info/Twain/marks_template.html -o $genlinx_moz -s mozilla
37 if [ $? != 0 ]; then
38   echo error during creation of the mozilla format page of bookmarks.
39   exit 1
40 fi
41
42 $RUNTIME_PATH/binaries/js_marks_maker -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -t $GRUNTOSE_DIR/Info/Twain/js_template.html -o $genlinx_js
43 if [ $? != 0 ]; then
44   echo error during creation of the javascript bookmark page.
45   exit 1
46 fi
47
48 \mv -f $genlinx $genlinx_moz $genlinx_js $GRUNTOSE_DIR/Info/Twain
49 \mv -f $newmarx $HOME
50