mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
Substitute config directory in scripts.
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
This commit is contained in:
parent
d255d511aa
commit
5c41d0eb4c
@ -218,6 +218,10 @@ localedir="$(eval echo ${localedir})"
|
|||||||
LOCALEDIR="$(eval echo ${localedir})"
|
LOCALEDIR="$(eval echo ${localedir})"
|
||||||
AC_SUBST(LOCALEDIR)
|
AC_SUBST(LOCALEDIR)
|
||||||
|
|
||||||
|
sysconfdir="$(eval echo ${sysconfdir})"
|
||||||
|
SYSCONFDIR="$(eval echo ${sysconfdir})"
|
||||||
|
AC_SUBST(SYSCONFDIR)
|
||||||
|
|
||||||
dnl ==========================================================================
|
dnl ==========================================================================
|
||||||
|
|
||||||
AC_OUTPUT([
|
AC_OUTPUT([
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
myver='@PACKAGE_VERSION@'
|
myver='@PACKAGE_VERSION@'
|
||||||
CONFDIR="/etc/abs"
|
CONFDIR="@SYSCONFDIR@/abs"
|
||||||
CONNMODE="m"
|
CONNMODE="m"
|
||||||
|
|
||||||
[ -f "$CONFDIR/abs.conf" ] && source "$CONFDIR/abs.conf"
|
[ -f "$CONFDIR/abs.conf" ] && source "$CONFDIR/abs.conf"
|
||||||
@ -35,8 +35,8 @@ usage() {
|
|||||||
echo
|
echo
|
||||||
echo "abs will synchronize PKGBUILD scripts from the CVS repository"
|
echo "abs will synchronize PKGBUILD scripts from the CVS repository"
|
||||||
echo "into $ABSROOT. You can follow different package trees by"
|
echo "into $ABSROOT. You can follow different package trees by"
|
||||||
echo "editing /etc/abs/supfile.* files. If no argument is given, abs "
|
echo "editing @SYSCONFDIR@/abs/supfile.* files. If no argument is given, abs "
|
||||||
echo "will synchronize from supfiles specified in /etc/abs/abs.conf."
|
echo "will synchronize from supfiles specified in @SYSCONFDIR@/abs/abs.conf."
|
||||||
echo "If -p is specified, the connection is opened in passive mode."
|
echo "If -p is specified, the connection is opened in passive mode."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,9 +37,9 @@ usage() {
|
|||||||
echo
|
echo
|
||||||
echo "note: The <destfile> name is important. It must be of the form"
|
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 " {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 " 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
|
||||||
echo "example: gensync /var/abs/local /home/mypkgs/custom.db.tar.gz"
|
echo "example: gensync /var/abs/local /home/mypkgs/custom.db.tar.gz"
|
||||||
echo
|
echo
|
||||||
@ -94,10 +94,10 @@ if [ $# -lt 2 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# source system and user makepkg.conf
|
# source system and user makepkg.conf
|
||||||
if [ -r /etc/makepkg.conf ]; then
|
if [ -r @SYSCONFDIR@/makepkg.conf ]; then
|
||||||
source /etc/makepkg.conf
|
source @SYSCONFDIR@/makepkg.conf
|
||||||
else
|
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
|
exit 1 # $E_CONFIG_ERROR # TODO: error codes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -38,8 +38,8 @@ startdir=$(pwd)
|
|||||||
|
|
||||||
# Only use ABSROOT if we haven't been passed a SRCROOT on the command line.
|
# Only use ABSROOT if we haven't been passed a SRCROOT on the command line.
|
||||||
if [ -z "$SRCROOT" ]; then
|
if [ -z "$SRCROOT" ]; then
|
||||||
if [ -r /etc/abs/abs.conf ]; then
|
if [ -r @SYSCONFDIR@/abs/abs.conf ]; then
|
||||||
source /etc/abs/abs.conf
|
source @SYSCONFDIR@/abs/abs.conf
|
||||||
fi
|
fi
|
||||||
if [ -r ~/.abs.conf ]; then
|
if [ -r ~/.abs.conf ]; then
|
||||||
source ~/.abs.conf
|
source ~/.abs.conf
|
||||||
@ -649,8 +649,8 @@ _PKGDEST=${PKGDEST}
|
|||||||
_SRCDEST=${SRCDEST}
|
_SRCDEST=${SRCDEST}
|
||||||
|
|
||||||
# Source makepkg.conf; fail if it is not found
|
# Source makepkg.conf; fail if it is not found
|
||||||
if [ -r /etc/makepkg.conf ]; then
|
if [ -r @SYSCONFDIR@/makepkg.conf ]; then
|
||||||
source /etc/makepkg.conf
|
source @SYSCONFDIR@/makepkg.conf
|
||||||
else
|
else
|
||||||
error "$(gettext "/etc/makepkg.conf not found. cannot continue")"
|
error "$(gettext "/etc/makepkg.conf not found. cannot continue")"
|
||||||
exit 1 # $E_CONFIG_ERROR # TODO: error codes
|
exit 1 # $E_CONFIG_ERROR # TODO: error codes
|
||||||
|
@ -237,8 +237,8 @@ if [ $# -lt 2 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# source system and user makepkg.conf
|
# source system and user makepkg.conf
|
||||||
if [ -r /etc/makepkg.conf ]; then
|
if [ -r @SYSCONFDIR@/makepkg.conf ]; then
|
||||||
source /etc/makepkg.conf
|
source @SYSCONFDIR@/makepkg.conf
|
||||||
else
|
else
|
||||||
echo "ERROR: /etc/makepkg.conf not found. Can not continue." >&2
|
echo "ERROR: /etc/makepkg.conf not found. Can not continue." >&2
|
||||||
exit 1 # $E_CONFIG_ERROR # TODO: error codes
|
exit 1 # $E_CONFIG_ERROR # TODO: error codes
|
||||||
|
@ -93,8 +93,8 @@ if [ $# -lt 2 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# source system and user makepkg.conf
|
# source system and user makepkg.conf
|
||||||
if [ -r /etc/makepkg.conf ]; then
|
if [ -r @SYSCONFDIR@/makepkg.conf ]; then
|
||||||
source /etc/makepkg.conf
|
source @SYSCONFDIR@/makepkg.conf
|
||||||
else
|
else
|
||||||
echo "ERROR: /etc/makepkg.conf not found. Can not continue." >&2
|
echo "ERROR: /etc/makepkg.conf not found. Can not continue." >&2
|
||||||
exit 1 # $E_CONFIG_ERROR # TODO: error codes
|
exit 1 # $E_CONFIG_ERROR # TODO: error codes
|
||||||
|
@ -96,8 +96,8 @@ if [ $# -lt 3 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# source system and user makepkg.conf
|
# source system and user makepkg.conf
|
||||||
if [ -r /etc/makepkg.conf ]; then
|
if [ -r @SYSCONFDIR@/makepkg.conf ]; then
|
||||||
source /etc/makepkg.conf
|
source @SYSCONFDIR@/makepkg.conf
|
||||||
else
|
else
|
||||||
echo "ERROR: /etc/makepkg.conf not found. Can not continue." >&2
|
echo "ERROR: /etc/makepkg.conf not found. Can not continue." >&2
|
||||||
exit 1 # $E_CONFIG_ERROR # TODO: error codes
|
exit 1 # $E_CONFIG_ERROR # TODO: error codes
|
||||||
|
Loading…
Reference in New Issue
Block a user