Newer version of the script upstream

This commit is contained in:
Pierre Pronchery 2014-03-04 02:38:35 +01:00
parent a564659939
commit 4abe839115

View File

@ -1,6 +1,6 @@
#!/bin/sh
#$Id$
#Copyright (c) 2010-2013 Pierre Pronchery <khorben@defora.org>
#Copyright (c) 2010-2014 Pierre Pronchery <khorben@defora.org>
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are met:
@ -26,7 +26,7 @@
#variables
PREFIX="/usr/local"
. "../config.sh"
[ -f "../config.sh" ] && . "../config.sh"
LOCALEDIR="$PREFIX/share/locale"
POTFILES="POTFILES"
#executables
@ -49,6 +49,14 @@ _debug()
}
#error
_error()
{
echo "gettext.sh: $@" 1>&2
return 2
}
#usage
_usage()
{
@ -111,7 +119,7 @@ while getopts "ciuP:" name; do
uninstall=1
;;
P)
PREFIX="$2"
PREFIX="$OPTARG"
;;
?)
_usage
@ -125,6 +133,12 @@ if [ $# -eq 0 ]; then
exit $?
fi
#check the variables
if [ -z "$PACKAGE" ]; then
_error "The PACKAGE variable needs to be set"
exit $?
fi
LOCALEDIR="$PREFIX/share/locale"
while [ $# -gt 0 ]; do
target="$1"