Newer version of the script upstream
This commit is contained in:
parent
a564659939
commit
4abe839115
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#$Id$
|
#$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
|
#Redistribution and use in source and binary forms, with or without
|
||||||
#modification, are permitted provided that the following conditions are met:
|
#modification, are permitted provided that the following conditions are met:
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#variables
|
#variables
|
||||||
PREFIX="/usr/local"
|
PREFIX="/usr/local"
|
||||||
. "../config.sh"
|
[ -f "../config.sh" ] && . "../config.sh"
|
||||||
LOCALEDIR="$PREFIX/share/locale"
|
LOCALEDIR="$PREFIX/share/locale"
|
||||||
POTFILES="POTFILES"
|
POTFILES="POTFILES"
|
||||||
#executables
|
#executables
|
||||||
|
@ -49,6 +49,14 @@ _debug()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#error
|
||||||
|
_error()
|
||||||
|
{
|
||||||
|
echo "gettext.sh: $@" 1>&2
|
||||||
|
return 2
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#usage
|
#usage
|
||||||
_usage()
|
_usage()
|
||||||
{
|
{
|
||||||
|
@ -111,7 +119,7 @@ while getopts "ciuP:" name; do
|
||||||
uninstall=1
|
uninstall=1
|
||||||
;;
|
;;
|
||||||
P)
|
P)
|
||||||
PREFIX="$2"
|
PREFIX="$OPTARG"
|
||||||
;;
|
;;
|
||||||
?)
|
?)
|
||||||
_usage
|
_usage
|
||||||
|
@ -125,6 +133,12 @@ if [ $# -eq 0 ]; then
|
||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#check the variables
|
||||||
|
if [ -z "$PACKAGE" ]; then
|
||||||
|
_error "The PACKAGE variable needs to be set"
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
LOCALEDIR="$PREFIX/share/locale"
|
LOCALEDIR="$PREFIX/share/locale"
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
target="$1"
|
target="$1"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user