From 5c41d0eb4c7034998d9718f89e12f44fe872ab9a Mon Sep 17 00:00:00 2001 From: Andrew Fyfe Date: Mon, 28 May 2007 20:49:28 +0100 Subject: Substitute config directory in scripts. Signed-off-by: Andrew Fyfe --- scripts/abs.in | 6 +++--- scripts/gensync.in | 10 +++++----- scripts/makepkg.in | 8 ++++---- scripts/repo-add.in | 4 ++-- scripts/repo-remove.in | 4 ++-- scripts/updatesync.in | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) (limited to 'scripts') 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 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 -- cgit v1.2.3-70-g09d2