File: uninstallcp.sh

package info (click to toggle)
samba 1.9.18p8-2
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 6,404 kB
  • ctags: 6,517
  • sloc: ansic: 60,637; sh: 1,095; perl: 650; makefile: 565; awk: 120; csh: 110
file content (33 lines) | stat: -rwxr-xr-x 869 bytes parent folder | download | duplicates (3)
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
#!/bin/sh

CPDIR=$1
shift

if [ ! -d $CPDIR ]; then
  echo Directory $CPDIR does not exist!
  echo Do a "make installcp" or "make install" first.
  exit 1
fi

for p in $*; do
  if [ ! -f $CPDIR/codepage.$p ]; then
    echo $CPDIR/codepage.$p does not exist!
  else
    echo Removing $CPDIR/codepage.$p
    rm -f $CPDIR/codepage.$p
    if [ -f $CPDIR/codepage.$p ]; then
      echo Cannot remove $CPDIR/codepage.$p... does $USER have privileges?
    fi
  fi
done

cat << EOF
======================================================================
The code pages have been uninstalled. You may reinstall them using
the command "make installcp" or "make install" to install binaries,
man pages, shell scripts and code pages. You may recover a previous version 
(if any with "make revert").
======================================================================
EOF

exit 0