File: create-utf8.sh

package info (click to toggle)
newt 0.50.17-9.6
  • links: PTS
  • area: main
  • in suites: woody
  • size: 572 kB
  • ctags: 1,065
  • sloc: ansic: 7,315; python: 537; makefile: 402; sh: 229
file content (39 lines) | stat: -rw-r--r-- 1,125 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
# run this shell script to create utf8 version.

set -e 
PWD=`pwd`
PACKAGENAME=`basename $PWD`
PACKAGENAMEUTF8=`echo $PACKAGENAME | sed 's/newt/newt-utf8/'`
ORIGTGZ=`echo $PACKAGENAME.orig.tar.gz | sed 's/-/_/'`
ORIGTGZUTF8=`echo $ORIGTGZ | sed 's/newt/newt-utf8/'`


if [ -d debian ]; then
    rm -rf  ../$PACKAGENAMEUTF8
    cp -a ../$PACKAGENAME  ../$PACKAGENAMEUTF8
    cp ../$ORIGTGZ ../$ORIGTGZUTF8
    cd ../$PACKAGENAMEUTF8

    # following code ripped off from fetchmail.
    (cd debian ;\
        sed -e 's/NEWT_TARGET=newt/binpackage=newt-utf8/' <rules > rules.new ;
        sed -e '1 s/newt (/newt-utf8 (/' \
	-e '2p' \
	-e '2s/.*/  * Auto-generated from the respective newt package/' \
	-e 's/closes:\ \+#/#/Ig' <changelog >>changelog.new ;
        mv -f control.utf8 control ;
        mv -f changelog.new changelog ;
        mv -f rules.new rules ;
        chmod +x rules ;
	for A in shlibs shlibs.local; do
	    sed 's/libnewt0/libnewt-utf8-0/' < $A >$A.new
	    mv -f $A.new $A
	done
	rm -f create-utf8.sh
    )
else
    echo "E: Please run this script within the debian source tree"
    exit 1
fi