2
################################################################################
3
### Copyright 2011 VMware, Inc. All rights reserved.
5
### This program is free software; you can redistribute it and/or modify
6
### it under the terms of version 2 of the GNU General Public License as
7
### published by the Free Software Foundation.
9
### This program is distributed in the hope that it will be useful,
10
### but WITHOUT ANY WARRANTY; without even the implied warranty of
11
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
### GNU General Public License for more details.
14
### You should have received a copy of the GNU General Public License
15
### along with this program; if not, write to the Free Software
16
### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
################################################################################
20
# instvmsg.sh - VMSG catalog install script.
22
# This script installs a set of VMSG catalogs into their correct location. It
23
# avoids having to copy and paste this logic into several makefiles, especially
24
# since non-GNU make does not support $(call ...).
27
# prog ($1): program name (name of target catalog file)
28
# src ($2): directory where catalogs are stored in the source tree.
29
# dest ($3): $(datadir)
37
if test -z $dest; then
38
echo "Missing parameters." 1>&2
42
for i in $src/*.vmsg; do
44
ldest=${dest}/open-vm-tools/messages/`echo $ldest | cut -d . -f 1 -`
45
if ! test -d $ldest; then
48
cp -f $i ${ldest}/${prog}.vmsg || exit 1