mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
Remove gettext calls from gensync/updatesync
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
4fad7855fa
commit
5d03a6fd94
@ -24,29 +24,29 @@ myver='3.1.1'
|
|||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
printf "gensync (pacman) %s\n\n" "$myver"
|
printf "gensync (pacman) %s\n\n" "$myver"
|
||||||
printf "$(gettext "Usage: %s <root> <destfile> [package_directory]")\n\n" "$0"
|
printf "Usage: %s <root> <destfile> [package_directory]\n\n" "$0"
|
||||||
printf "$(gettext "\
|
printf "\
|
||||||
gensync will generate a sync database by reading all PKGBUILD files\n\
|
gensync will generate a sync database by reading all PKGBUILD files\n\
|
||||||
from <root>. gensync builds the database in a temporary directory\n\
|
from <root>. gensync builds the database in a temporary directory\n\
|
||||||
and then compresses it to <destfile>.\n\n")"
|
and then compresses it to <destfile>.\n\n"
|
||||||
printf "$(gettext "\
|
printf "\
|
||||||
gensync will calculate md5sums of packages in the same directory as\n\
|
gensync will calculate md5sums of packages in the same directory as\n\
|
||||||
<destfile>, unless an alternate [package_directory] is specified.\n\n")"
|
<destfile>, unless an alternate [package_directory] is specified.\n\n"
|
||||||
printf "$(gettext "\
|
printf "\
|
||||||
note: The <destfile> name is important. It must be of the form\n\
|
note: The <destfile> name is important. It must be of the form\n\
|
||||||
{treename}.db.tar.gz where {treename} is the name of the custom\n\
|
{treename}.db.tar.gz where {treename} is the name of the custom\n\
|
||||||
package repository you configured in /etc/pacman.conf. The\n\
|
package repository you configured in /etc/pacman.conf. The\n\
|
||||||
generated database must reside in the same directory as your\n\
|
generated database must reside in the same directory as your\n\
|
||||||
custom packages (also configured in /etc/pacman.conf)\n\n")"
|
custom packages (also configured in /etc/pacman.conf)\n\n"
|
||||||
echo "$(gettext "Example: gensync /var/abs/local /home/mypkgs/custom.db.tar.gz")"
|
echo "Example: gensync /var/abs/local /home/mypkgs/custom.db.tar.gz"
|
||||||
}
|
}
|
||||||
|
|
||||||
version() {
|
version() {
|
||||||
printf "gensync (pacman) %s\n" "$myver"
|
printf "gensync (pacman) %s\n" "$myver"
|
||||||
printf "$(gettext "\
|
printf "\
|
||||||
Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.org>.\n\n\
|
Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.org>.\n\n\
|
||||||
This is free software; see the source for copying conditions.\n\
|
This is free software; see the source for copying conditions.\n\
|
||||||
There is NO WARRANTY, to the extent permitted by law.\n")"
|
There is NO WARRANTY, to the extent permitted by law.\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
error () {
|
error () {
|
||||||
@ -109,9 +109,9 @@ if [ "$3" != "" ]; then
|
|||||||
pkgdir="$3"
|
pkgdir="$3"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ ! -d "$rootdir" ] && die "$(gettext "invalid root dir: %s")" $rootdir
|
[ ! -d "$rootdir" ] && die "invalid root dir: $rootdir"
|
||||||
|
|
||||||
echo "$(gettext "gensync: building database entries, generating md5sums...")" >&2
|
echo "gensync: building database entries, generating md5sums..." >&2
|
||||||
cd "$destdir"
|
cd "$destdir"
|
||||||
|
|
||||||
pkgs=""
|
pkgs=""
|
||||||
@ -120,7 +120,7 @@ forcepkgs=""
|
|||||||
for file in $(find "$rootdir"/* -name "$BUILDSCRIPT"); do
|
for file in $(find "$rootdir"/* -name "$BUILDSCRIPT"); do
|
||||||
unset pkgname pkgver pkgrel options
|
unset pkgname pkgver pkgrel options
|
||||||
|
|
||||||
source $file || die "$(gettext "failed to parse %s")" $file
|
source $file || die "failed to parse $file"
|
||||||
if [ "$arch" = 'any' ]; then
|
if [ "$arch" = 'any' ]; then
|
||||||
CARCH='any'
|
CARCH='any'
|
||||||
fi
|
fi
|
||||||
@ -131,7 +131,7 @@ for file in $(find "$rootdir"/* -name "$BUILDSCRIPT"); do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "$pkgfile" ]; then
|
if [ ! -f "$pkgfile" ]; then
|
||||||
error "$(gettext "could not find %s-%s-%s-%s%s - skipping")" $pkgname $pkgver $pkgrel $CARCH $PKGEXT
|
error "could not find %s-%s-%s-%s%s - skipping" $pkgname $pkgver $pkgrel $CARCH $PKGEXT
|
||||||
else
|
else
|
||||||
if check_force; then
|
if check_force; then
|
||||||
forcepkgs="$forcepkgs $pkgfile"
|
forcepkgs="$forcepkgs $pkgfile"
|
||||||
@ -141,7 +141,7 @@ for file in $(find "$rootdir"/* -name "$BUILDSCRIPT"); do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "$(gettext "creating repo DB...")"
|
echo "creating repo DB..."
|
||||||
|
|
||||||
# we'll trim the output just a tad, as gensync may be used on large repos
|
# we'll trim the output just a tad, as gensync may be used on large repos
|
||||||
repo-add $destfile $pkgs --force $force_pkgs \
|
repo-add $destfile $pkgs --force $force_pkgs \
|
||||||
|
@ -25,27 +25,27 @@ myver='3.1.1'
|
|||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
printf "updatesync (pacman) %s\n\n" "$myver"
|
printf "updatesync (pacman) %s\n\n" "$myver"
|
||||||
printf "$(gettext "Usage: %s <action> <destfile> <option> [package_directory]")\n\n" "$0"
|
printf "Usage: %s <action> <destfile> <option> [package_directory]\n\n" "$0"
|
||||||
printf "$(gettext "\
|
printf "\
|
||||||
updatesync will update a sync database by reading a PKGBUILD and\n\
|
updatesync will update a sync database by reading a PKGBUILD and\n\
|
||||||
modifying the destfile. updatesync updates the database in a temporary\n\
|
modifying the destfile. updatesync updates the database in a temporary\n\
|
||||||
directory and then compresses it to <destfile>.\n\n")"
|
directory and then compresses it to <destfile>.\n\n"
|
||||||
printf "$(gettext "There are two types of actions:\n\n")"
|
printf "There are two types of actions:\n\n"
|
||||||
printf "$(gettext "upd - Will update a package's entry or create it if it doesn't exist.\n It takes the package's PKGBUILD as an option.\n")"
|
printf "upd - Will update a package's entry or create it if it doesn't exist.\n It takes the package's PKGBUILD as an option.\n"
|
||||||
printf "$(gettext "del - Will remove a package's entry from the db. It takes the package's\n name as an option.\n")"
|
printf "del - Will remove a package's entry from the db. It takes the package's\n name as an option.\n"
|
||||||
echo
|
echo
|
||||||
printf "$(gettext "\
|
printf "\
|
||||||
updatesync will calculate md5sums of packages in the same directory as\n\
|
updatesync will calculate md5sums of packages in the same directory as\n\
|
||||||
<destfile>, unless an alternate [package_directory] is specified.\n\n")"
|
<destfile>, unless an alternate [package_directory] is specified.\n\n"
|
||||||
echo "$(gettext "Example: updatesync upd /home/mypkgs/custom.db.tar.gz PKGBUILD")"
|
echo "Example: updatesync upd /home/mypkgs/custom.db.tar.gz PKGBUILD"
|
||||||
}
|
}
|
||||||
|
|
||||||
version() {
|
version() {
|
||||||
printf "updatesync (pacman) %s\n" "$myver"
|
printf "updatesync (pacman) %s\n" "$myver"
|
||||||
printf "$(gettext "\
|
printf "\
|
||||||
Copyright (C) 2004 Jason Chu <jason@archlinux.org>.\n\n\
|
Copyright (C) 2004 Jason Chu <jason@archlinux.org>.\n\n\
|
||||||
This is free software; see the source for copying conditions.\n\
|
This is free software; see the source for copying conditions.\n\
|
||||||
There is NO WARRANTY, to the extent permitted by law.\n")"
|
There is NO WARRANTY, to the extent permitted by law.\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
error () {
|
error () {
|
||||||
@ -113,19 +113,19 @@ opt_force=""
|
|||||||
|
|
||||||
if [ "$action" = "upd" ]; then # INSERT / UPDATE
|
if [ "$action" = "upd" ]; then # INSERT / UPDATE
|
||||||
if [ ! -f "$option" ]; then
|
if [ ! -f "$option" ]; then
|
||||||
die "$(gettext "%s not found")" $option
|
die "$option not found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset pkgname pkgver pkgrel options
|
unset pkgname pkgver pkgrel options
|
||||||
|
|
||||||
source $option || die "$(gettext "failed to parse %s")" $option
|
source $option || die "failed to parse $option"
|
||||||
if [ "$arch" = 'any' ]; then
|
if [ "$arch" = 'any' ]; then
|
||||||
CARCH='any'
|
CARCH='any'
|
||||||
fi
|
fi
|
||||||
pkgfile="$pkgdir/$pkgname-$pkgver-$pkgrel-${CARCH}${PKGEXT}"
|
pkgfile="$pkgdir/$pkgname-$pkgver-$pkgrel-${CARCH}${PKGEXT}"
|
||||||
|
|
||||||
if [ ! -f "$pkgfile" ]; then
|
if [ ! -f "$pkgfile" ]; then
|
||||||
die "$(gettext "could not find %s-%s-%s-%s%s - aborting")" $pkgname $pkgver $pkgrel $CARCH $PKGEXT
|
die "could not find %s-%s-%s-%s%s - aborting" $pkgname $pkgver $pkgrel $CARCH $PKGEXT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if check_force; then
|
if check_force; then
|
||||||
@ -137,7 +137,7 @@ else # DELETE
|
|||||||
fname="$(basename $option)"
|
fname="$(basename $option)"
|
||||||
if [ "$fname" = "PKGBUILD" ]; then
|
if [ "$fname" = "PKGBUILD" ]; then
|
||||||
if [ ! -f "$option" ]; then
|
if [ ! -f "$option" ]; then
|
||||||
die "$(gettext "%s not found")" $option
|
die "%s not found" $option
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset pkgname pkgver pkgrel options
|
unset pkgname pkgver pkgrel options
|
||||||
|
Loading…
Reference in New Issue
Block a user