Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Fyfe <andrew@neptune-one.net>2007-05-28 20:49:28 +0100
committerDan McGee <dan@archlinux.org>2007-05-29 17:49:24 -0400
commit5c41d0eb4c7034998d9718f89e12f44fe872ab9a (patch)
tree92905a04a5987ab7e9ec17515417d16cffb556b4
parentd255d511aa9cbfa7b3bf056908c07f5afed69b72 (diff)
Substitute config directory in scripts.
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
-rw-r--r--configure.ac4
-rw-r--r--scripts/abs.in6
-rw-r--r--scripts/gensync.in10
-rw-r--r--scripts/makepkg.in8
-rw-r--r--scripts/repo-add.in4
-rw-r--r--scripts/repo-remove.in4
-rw-r--r--scripts/updatesync.in4
7 files changed, 22 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index 76b4b31b..fa4b84b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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([
diff --git a/scripts/abs.in b/scripts/abs.in
index 7ed677d4..b086aea6 100644
--- a/scripts/abs.in
+++ b/scripts/abs.in
@@ -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."
}
diff --git a/scripts/gensync.in b/scripts/gensync.in
index 7898f286..0639f89c 100644
--- a/scripts/gensync.in
+++ b/scripts/gensync.in
@@ -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
diff --git a/scripts/makepkg.in b/scripts/makepkg.in
index 0743b8fc..278050d7 100644
--- a/scripts/makepkg.in
+++ b/scripts/makepkg.in
@@ -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
diff --git a/scripts/repo-add.in b/scripts/repo-add.in
index f8c71557..fdcc43a9 100644
--- a/scripts/repo-add.in
+++ b/scripts/repo-add.in
@@ -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
diff --git a/scripts/repo-remove.in b/scripts/repo-remove.in
index 18291f65..0bb37075 100644
--- a/scripts/repo-remove.in
+++ b/scripts/repo-remove.in
@@ -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
diff --git a/scripts/updatesync.in b/scripts/updatesync.in
index eb82bdec..6a59edc5 100644
--- a/scripts/updatesync.in
+++ b/scripts/updatesync.in
@@ -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