summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/chroot-tools/librechroot3
-rwxr-xr-xsrc/chroot-tools/libremakepkg3
-rw-r--r--src/lib/conf.sh36
-rwxr-xr-xsrc/librefetch/librefetch3
-rwxr-xr-xsrc/treepkg7
5 files changed, 10 insertions, 42 deletions
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot
index 0fd621b..80c7f4f 100755
--- a/src/chroot-tools/librechroot
+++ b/src/chroot-tools/librechroot
@@ -21,7 +21,8 @@
# along with Parabola. If not, see <http://www.gnu.org/licenses/>.
. $(librelib conf.sh)
-load_conf_libretools_chroot
+load_files chroot
+[[ -f /.arch-chroot ]] || check_vars chroot CHROOTDIR CHROOT
. libremessages
. $(librelib makechrootpkg)
diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg
index f1b3916..b86506a 100755
--- a/src/chroot-tools/libremakepkg
+++ b/src/chroot-tools/libremakepkg
@@ -21,7 +21,8 @@
# along with Parabola. If not, see <http://www.gnu.org/licenses/>.
. $(librelib conf.sh)
-load_conf_libretools_chroot
+load_files chroot
+[[ -f /.arch-chroot ]] || check_vars chroot CHROOTDIR CHROOT
. libremessages
makechrootpkg=$(librelib makechrootpkg)
diff --git a/src/lib/conf.sh b/src/lib/conf.sh
index 607f2b8..b9e8698 100644
--- a/src/lib/conf.sh
+++ b/src/lib/conf.sh
@@ -93,16 +93,12 @@ check_vars() {
# makepkg configuration ########################################################
-load_conf_makepkg() {
- load_files makepkg
-}
-
# Usage: get_conf_makepkg <var_name> <default_value>
get_conf_makepkg() (
set +euE
local setting=$1
local default=$2
- load_conf_makepkg
+ load_files makepkg
printf '%s\n' "${!setting:-${default}}"
)
@@ -118,33 +114,3 @@ set_conf_makepkg() {
done
return 1
}
-
-# libretools configuration #####################################################
-
-check_conf_libretools() {
- check_vars libretools \
- PARABOLAHOST LIBREDESTDIR BLACKLIST WORKDIR REPOS ARCHES \
- ABSLIBREGIT DIFFTOOL FULLBUILDCMD SIGEXT SIGID
-}
-
-load_conf_libretools() {
- load_files libretools
- check_conf_libretools
-}
-
-load_conf_libretools_chroot() {
- load_files chroot
- # Exclude CHROOTEXTRAPKG from the checks because an empty value is valid
- if [[ -f /.arch-chroot ]]; then
- # inside of a chroot, only CHROOTEXTRAPKG needs to be set, but
- # as stated above, we don't check for it.
- :
- else
- check_vars chroot CHROOTDIR CHROOT
- fi
-}
-
-load_conf_libretools_librefetch() {
- load_files librefetch
- check_vars librefetch MIRROR DOWNLOADER
-}
diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch
index 9b90798..ce60396 100755
--- a/src/librefetch/librefetch
+++ b/src/librefetch/librefetch
@@ -116,7 +116,8 @@ main() {
# Mode: download #######################################################
if [[ $mode =~ download ]]; then
- load_conf_libretools_librefetch || return 1
+ load_files librefetch
+ check_vars librefetch MIRROR DOWNLOADER || return 1
local url="${MIRROR}/${src}"
diff --git a/src/treepkg b/src/treepkg
index 1796748..795faea 100755
--- a/src/treepkg
+++ b/src/treepkg
@@ -18,13 +18,12 @@
source libremessages
source $(librelib conf.sh)
-load_conf_libretools
+load_files libretools
+check_vars libretools HOOKPREBUILD FULLBUILDCMD HOOKLOCALRELEASE
+load_files makepkg
term_title "$(basename $0)"
-# Get system variables
-load_files makepkg
-
# End inmediately but print an useful message
trap_exit() {
term_title "error!"