source: other-projects/realistic-books/trunk/CASCADE-MAKE.sh@ 24916

Last change on this file since 24916 was 19734, checked in by davidb, 12 years ago

General improvements

File size: 1.3 KB
Line 
1#!/bin/bash
2
3source setup.bash silent
4source cascade-make/lib/cascade-lib.bash
5
6
7# Ensure that the necessary directories exist within the 'installed' area
8
9for d in include lib ; do
10 if [ ! -e "$RBHOME_INSTALLED/$d" ] ; then
11 echo "Creating $RBHOME_INSTALLED/$d"
12 mkdir -p "$RBHOME_INSTALLED/$d"
13 fi
14done
15
16
17for d in packages ; do
18 echo "Running $d/CASCADE-MAKE.sh $*"
19
20 (cd $d ; ./CASCADE-MAKE.sh $*)
21
22 if [ $? != 0 ] ; then
23 echo "Error encountered running $d/CASCADE-MAKE.sh"
24 exit 1
25 fi
26done
27
28if [ $install = "1" ] ; then
29
30 if [ ! -e "$RBHOME_INSTALLED/bin/script" ] ; then
31 echo "Creating $RBHOME_INSTALLED/bin/script"
32 mkdir "$RBHOME_INSTALLED/bin/script"
33 fi
34
35 /bin/cp src/pdf2realbook.pl "$RBHOME_INSTALLED/bin/script/."
36 chmod a+x "$RBHOME_INSTALLED/bin/script/pdf2realbook.pl"
37
38 # Configure CGI files
39
40 rbfile="cgi-bin/rbsite.cfg"
41 echo "Setting rbhome to $REALISTIC_BOOKS_HOME in $rbfile"
42 cat "$rbfile.in" \
43 | sed "s@\*\*RBHOME\*\*@$REALISTIC_BOOKS_HOME@g" \
44 > "$rbfile"
45
46 perlbin=`which perl 2>/dev/null`
47 if [ $? == "0" ] ; then
48 cgifile="cgi-bin/make-realbook.cgi"
49 echo "Setting PERLBIN to $perlbin in $cgifile"
50 cat "$cgifile.in" \
51 | sed "s@\*\*PERLBIN\*\*@$perlbin@g" \
52 > "$cgifile"
53 else
54 echo "Unable to find perl on PATH. Failed to set PERLBIN in $cgifile"
55 fi
56
57fi
58
Note: See TracBrowser for help on using the repository browser.