root/gs3-extensions/i-greenstone-server/trunk/src/REBRAND.sh @ 26612

Revision 26612, 1.7 KB (checked in by davidb, 7 years ago)

Minor set of bug-fixes to files when testing out in Chris's account

Line 
1#/bin/bash
2
3echo
4echo "Used 'Segoe Print Bold' in GIMP at 70pt to generate main 'Greenstone://' image"
5echo
6
7
8cd i-jetty-3.1/i-jetty-ui
9
10jfiles=`find res -name "*jetty*"`
11
12for jfile in $jfiles ; do
13  if [ ! -e before-rebranding/$jfile ] ; then
14    gfile=`echo $jfile | sed 's/jetty/greenstone/g'`
15
16    echo "Rebranding file ${jfile##*/} to  ${gfile##*/}"
17
18    jdir=${jfile%/*}
19
20    if [ ! -d before-rebranding/$jdir ] ; then
21      mkdir -p before-rebranding/$jdir
22    fi
23
24    # Take copy before move for purposes of restore
25    /bin/cp $jfile before-rebranding/$jfile
26
27    /bin/mv $jfile $gfile
28  fi
29done
30
31jfiles=`fgrep -rl 'jetty' res src`
32for jfile in $jfiles ; do
33
34  if [ ! -e before-rebranding2/$jfile ] ; then
35    echo "Rebranding content for ${jfile##*/} from 'jetty' to 'greenstone'"
36
37    jdir=${jfile%/*}
38
39    if [ ! -d before-rebranding2/$jdir ] ; then
40      mkdir -p before-rebranding2/$jdir
41    fi
42
43    /bin/mv $jfile before-rebranding2/$jfile
44 
45    cat before-rebranding2/$jfile \
46      | sed 's/jetty/greenstone/g' \
47      | sed 's/i-Jetty/i-Greenstone/g' \
48      | sed 's/org.eclipse.greenstone/org.eclipse.jetty/g' \
49      | sed 's/mortbay.igreenstone/mortbay.ijetty/g' > $jfile.rebranded
50
51    if [ $jfile == "res/values/strings.xml" ] ; then
52      cat $jfile.rebranded | sed 's/Jetty/Greenstone/g' > $jfile.rebranded2
53      /bin/mv $jfile.rebranded2 $jfile.rebranded
54    fi
55
56
57    /bin/mv $jfile.rebranded $jfile
58  fi
59
60done
61
62
63
64cd ../..
65
66
67echo
68echo "***"
69echo "* Now"
70echo "*   cd i-jetty-3.1/i-jetty-ui"
71echo "*   mvn clean install"
72echo "* And run ./deploy.sh [id] to install and run on an Android device"
73echo "*  'adb devices' will list all devices attached"
74echo "***"
75echo
76
77
Note: See TracBrowser for help on using the browser.