From 1316ba7aa96c69ea541f1b7b3715aad5d1c8eb14 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 31 May 2013 18:52:49 -0600 Subject: [all tools]: use conf.sh (and libremessages if necessary) --- src/abslibre-tools/createworkdir | 7 ++++--- src/abslibre-tools/libreaddiff | 6 +++--- src/abslibre-tools/librerelease | 17 +++++++---------- src/abslibre-tools/librestage | 10 +++++----- 4 files changed, 19 insertions(+), 21 deletions(-) (limited to 'src/abslibre-tools') diff --git a/src/abslibre-tools/createworkdir b/src/abslibre-tools/createworkdir index 2fdf107..e98da3e 100755 --- a/src/abslibre-tools/createworkdir +++ b/src/abslibre-tools/createworkdir @@ -21,9 +21,10 @@ # You should have received a copy of the GNU General Public License # along with Parabola. If not, see . -source /etc/libretools.conf -custom_config=$XDG_CONFIG_HOME/libretools/libretools.conf -[[ -e $custom_config ]] && source $custom_config +. libremessages +. $(librelib conf.sh) +load_files libretools +check_vars libretools WORKDIR REPOS ABSLIBREGIT || exit 1 [[ ! -d ${WORKDIR} ]] && { # Create the WORKDIR diff --git a/src/abslibre-tools/libreaddiff b/src/abslibre-tools/libreaddiff index a75fb02..fafdada 100755 --- a/src/abslibre-tools/libreaddiff +++ b/src/abslibre-tools/libreaddiff @@ -15,9 +15,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -. /etc/libretools.conf -custom_config=$XDG_CONFIG_HOME/libretools/libretools.conf -[ -e $custom_config ] && . $custom_config +. $(librelib conf.sh) +load_files libretools +check_vars libretools WORKDIR for arg in "$@" ; do case "$arg" in diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease index 5a98cf8..265550f 100755 --- a/src/abslibre-tools/librerelease +++ b/src/abslibre-tools/librerelease @@ -21,8 +21,12 @@ # You should have received a copy of the GNU General Public License # along with Parabola. If not, see . -source /etc/libretools.conf -custom_config=$XDG_CONFIG_HOME/libretools/libretools.conf +. libremessages +. $(librelib conf.sh) +load_files libretools +check_vars libretools WORKDIR PARABOLAHOST LIBREDESTDIR SIGID || exit 1 +# The following variables are actually optional +#check_vars libretools SIGEXT HOOKPRERELEASE || exit 1 function usage { echo "$(gettext "Usage: $0")" @@ -108,17 +112,10 @@ while getopts 'hlcn' arg; do esac done -[[ -e $custom_config ]] && source $custom_config - [[ ! -z ${HOOKPRERELEASE} ]] && bash -c "${HOOKPRERELEASE}" clean_non_packages -if [ ! -z "${SIGID}" ]; then - sign_packages -else - error "Package signing is *required*, please set SIGID on your libretools.conf" - exit 1 -fi +sign_packages # Make the permissions of the packages 644 otherwise the user will get access # denied error when they try to download (rsync --no-perms doesn't seem to diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage index ae66cce..c0936cc 100755 --- a/src/abslibre-tools/librestage +++ b/src/abslibre-tools/librestage @@ -22,9 +22,10 @@ # along with Parabola. If not, see . -source /etc/libretools.conf -custom_config=$XDG_CONFIG_HOME/libretools/libretools.conf -[[ -e $custom_config ]] && source $custom_config +. libremessages +. $(librelib conf.sh) +load_files libretools +check_vars libretools ARCHES WORKDIR || exit 1 if [ -w / ]; then error "This script should be run as regular user" @@ -68,8 +69,7 @@ fi } # Source the needed files -source /etc/makepkg.conf -[[ -e ~/.makepkg.conf ]] && source ~/.makepkg.conf +load_files makepkg source ./PKGBUILD [[ -e ./rePKGBUILD ]] && source ./rePKGBUILD -- cgit v1.2.3