Substitute config directory in scripts.

Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
This commit is contained in:
Andrew Fyfe 2007-05-28 20:49:28 +01:00 committed by Dan McGee
parent d255d511aa
commit 5c41d0eb4c
7 changed files with 22 additions and 18 deletions

View File

@ -218,6 +218,10 @@ localedir="$(eval echo ${localedir})"
LOCALEDIR="$(eval echo ${localedir})"
AC_SUBST(LOCALEDIR)
sysconfdir="$(eval echo ${sysconfdir})"
SYSCONFDIR="$(eval echo ${sysconfdir})"
AC_SUBST(SYSCONFDIR)
dnl ==========================================================================
AC_OUTPUT([

View File

@ -21,7 +21,7 @@
#
myver='@PACKAGE_VERSION@'
CONFDIR="/etc/abs"
CONFDIR="@SYSCONFDIR@/abs"
CONNMODE="m"
[ -f "$CONFDIR/abs.conf" ] && source "$CONFDIR/abs.conf"
@ -35,8 +35,8 @@ usage() {
echo
echo "abs will synchronize PKGBUILD scripts from the CVS repository"
echo "into $ABSROOT. You can follow different package trees by"
echo "editing /etc/abs/supfile.* files. If no argument is given, abs "
echo "will synchronize from supfiles specified in /etc/abs/abs.conf."
echo "editing @SYSCONFDIR@/abs/supfile.* files. If no argument is given, abs "
echo "will synchronize from supfiles specified in @SYSCONFDIR@/abs/abs.conf."
echo "If -p is specified, the connection is opened in passive mode."
}

View File

@ -37,9 +37,9 @@ usage() {
echo
echo "note: The <destfile> name is important. It must be of the form"
echo " {treename}.db.tar.gz where {treename} is the name of the custom"
echo " package repository you configured in /etc/pacman.conf. The"
echo " package repository you configured in @SYSCONFDIR@/pacman.conf. The"
echo " generated database must reside in the same directory as your"
echo " custom packages (also configured in /etc/pacman.conf)"
echo " custom packages (also configured in @SYSCONFDIR@/pacman.conf)"
echo
echo "example: gensync /var/abs/local /home/mypkgs/custom.db.tar.gz"
echo
@ -94,10 +94,10 @@ if [ $# -lt 2 ]; then
fi
# source system and user makepkg.conf
if [ -r /etc/makepkg.conf ]; then
source /etc/makepkg.conf
if [ -r @SYSCONFDIR@/makepkg.conf ]; then
source @SYSCONFDIR@/makepkg.conf
else
echo "ERROR: /etc/makepkg.conf not found. Can not continue." >&2
echo "ERROR: @SYSCONFDIR@/makepkg.conf not found. Can not continue." >&2
exit 1 # $E_CONFIG_ERROR # TODO: error codes
fi

View File

@ -38,8 +38,8 @@ startdir=$(pwd)
# Only use ABSROOT if we haven't been passed a SRCROOT on the command line.
if [ -z "$SRCROOT" ]; then
if [ -r /etc/abs/abs.conf ]; then
source /etc/abs/abs.conf
if [ -r @SYSCONFDIR@/abs/abs.conf ]; then
source @SYSCONFDIR@/abs/abs.conf
fi
if [ -r ~/.abs.conf ]; then
source ~/.abs.conf
@ -649,8 +649,8 @@ _PKGDEST=${PKGDEST}
_SRCDEST=${SRCDEST}
# Source makepkg.conf; fail if it is not found
if [ -r /etc/makepkg.conf ]; then
source /etc/makepkg.conf
if [ -r @SYSCONFDIR@/makepkg.conf ]; then
source @SYSCONFDIR@/makepkg.conf
else
error "$(gettext "/etc/makepkg.conf not found. cannot continue")"
exit 1 # $E_CONFIG_ERROR # TODO: error codes

View File

@ -237,8 +237,8 @@ if [ $# -lt 2 ]; then
fi
# source system and user makepkg.conf
if [ -r /etc/makepkg.conf ]; then
source /etc/makepkg.conf
if [ -r @SYSCONFDIR@/makepkg.conf ]; then
source @SYSCONFDIR@/makepkg.conf
else
echo "ERROR: /etc/makepkg.conf not found. Can not continue." >&2
exit 1 # $E_CONFIG_ERROR # TODO: error codes

View File

@ -93,8 +93,8 @@ if [ $# -lt 2 ]; then
fi
# source system and user makepkg.conf
if [ -r /etc/makepkg.conf ]; then
source /etc/makepkg.conf
if [ -r @SYSCONFDIR@/makepkg.conf ]; then
source @SYSCONFDIR@/makepkg.conf
else
echo "ERROR: /etc/makepkg.conf not found. Can not continue." >&2
exit 1 # $E_CONFIG_ERROR # TODO: error codes

View File

@ -96,8 +96,8 @@ if [ $# -lt 3 ]; then
fi
# source system and user makepkg.conf
if [ -r /etc/makepkg.conf ]; then
source /etc/makepkg.conf
if [ -r @SYSCONFDIR@/makepkg.conf ]; then
source @SYSCONFDIR@/makepkg.conf
else
echo "ERROR: /etc/makepkg.conf not found. Can not continue." >&2
exit 1 # $E_CONFIG_ERROR # TODO: error codes