diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-09-13 09:43:21 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-09-13 09:43:21 -0700 |
commit | 5280f9a0cd1f9ba200422ebba65d1e0133410995 (patch) | |
tree | bf85ce4e320a769d7e0903ff52ccfde13a422666 /msgs/inst.sh | |
download | man-5280f9a0cd1f9ba200422ebba65d1e0133410995.tar.gz man-5280f9a0cd1f9ba200422ebba65d1e0133410995.tar.bz2 man-5280f9a0cd1f9ba200422ebba65d1e0133410995.zip |
Initial.man-1.6g
Diffstat (limited to 'msgs/inst.sh')
-rwxr-xr-x | msgs/inst.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/msgs/inst.sh b/msgs/inst.sh new file mode 100755 index 0000000..cea72d2 --- /dev/null +++ b/msgs/inst.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +# install message catalogs - very primitive + +lgs=$1 +locdir=$2 +M= + +# if no locale then do nothing +if [ "$locdir" = "" ]; then + exit 0 +fi + +if [ "$lgs" = "??" ]; then + M=mess.*.cat +else + for i in $lgs + do + if [ -f mess.$i.cat ]; then + M="$M mess.$i.cat" + else + echo "==== No mess.$i.cat found. ====" + fi + done +fi + +for j in $M; do + if [ -f $j ]; then + i=`echo $j | sed -e 's/mess.//; s/.cat//'` + dest=`echo $locdir | sed -e "s/%N/man/; s/%L/$i/"` + dest=${PREFIX}$dest + echo "mkdir -p `dirname $dest`" + mkdir -p `dirname $dest`; + echo "install -c -m 644 $j $dest" + install -c -m 644 $j $dest + fi +done + |