this now works as a add|delete share command :-)
[Samba.git] / source / script / installcp.sh
blobd0c5bf8ecc9970f4a4c733c2cea7deec34bccf0d
1 #!/bin/sh
2 srcdir=$1
3 LIBDIR=$2
4 CODEPAGEDIR=$3
5 BINDIR=$4
7 shift
8 shift
9 shift
10 shift
12 echo Installing codepage files in $CODEPAGEDIR
13 for d in $LIBDIR $CODEPAGEDIR; do
14 if [ ! -d $d ]; then
15 mkdir $d
16 if [ ! -d $d ]; then
17 echo Failed to make directory $d
18 exit 1
21 done
23 for p in $*; do
24 if [ -f ${srcdir}/codepages/codepage_def.$p ]; then
25 echo Creating codepage file $CODEPAGEDIR/codepage.$p
26 $BINDIR/make_smbcodepage c $p ${srcdir}/codepages/codepage_def.$p $CODEPAGEDIR/codepage.$p
28 if [ -f ${srcdir}/codepages/CP${p}.TXT ]; then
29 echo Creating unicode map $CODEPAGEDIR/unicode_map.$p
30 $BINDIR/make_unicodemap $p ${srcdir}/codepages/CP${p}.TXT $CODEPAGEDIR/unicode_map.$p
32 done
35 cat << EOF
36 ======================================================================
37 The code pages have been installed. You may uninstall them using the
38 command "make uninstallcp" or make "uninstall" to uninstall binaries,
39 man pages, shell scripts and code pages.
40 ======================================================================
41 EOF
43 exit 0