From 78f7d984d374868be06a40517be1df7c0c74a6b1 Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Sat, 16 Oct 2010 22:04:54 -0500 Subject: [PATCH] script/makepkg: move configuration beneath function definitions --- script/makepkg | 80 +++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/script/makepkg b/script/makepkg index 2a8ef33..7e15537 100755 --- a/script/makepkg +++ b/script/makepkg @@ -15,46 +15,6 @@ leaf_ports() { done | sort } -######## -# -# Configuration variable setup -# -######## - -# Base directory for everything -base_dir="$(realpath "$(dirname "${0}")/../worlds")" - -# Directory where distfiles will be stored between builds -dist_dir="${base_dir}/distfiles" - -# Final directory for built packages (Outside chroot) -final_pkg_dir="${base_dir}/pkg" -final_bdeps_dir="${base_dir}/bdeps" - -# Chroot directory -chroot_dir="${base_dir}/root" - -# Package directories, must be under ${chroot_dir} -pkg_dir="${chroot_dir}/pkg" -bdeps_dir="${pkg_dir}/bdeps" - -# Compute in-chroot pkg and bdeps dirs -chroot_pkg_dir="${pkg_dir##${chroot_dir}}" -chroot_bdeps_dir="${bdeps_dir##${chroot_dir}}" - -# Chroot environment -chroot_env=" -USER=root -HOME=/root -LOGNAME=root -PATH=:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -SHELL=/bin/sh -TERM=${TERM} -" - -# Tempvars -unset _port_config_recursive_cache - ######## # # Chroot handling @@ -206,6 +166,8 @@ port_config_recursive() { shift done } +# Config cache +unset _port_config_recursive_cache # Remove saved config for a list of ports port_rmconfig() { @@ -341,3 +303,41 @@ chport() { pkg_final pkg_delete_all } + + +######## +# +# Configuration variable setup +# +######## + +# Base directory for everything +base_dir="$(realpath "$(dirname "${0}")/../worlds")" + +# Directory where distfiles will be stored between builds +dist_dir="${base_dir}/distfiles" + +# Final directory for built packages (Outside chroot) +final_pkg_dir="${base_dir}/pkg" +final_bdeps_dir="${base_dir}/bdeps" + +# Chroot directory +chroot_dir="${base_dir}/root" + +# Package directories, must be under ${chroot_dir} +pkg_dir="${chroot_dir}/pkg" +bdeps_dir="${pkg_dir}/bdeps" + +# Compute in-chroot pkg and bdeps dirs +chroot_pkg_dir="${pkg_dir##${chroot_dir}}" +chroot_bdeps_dir="${bdeps_dir##${chroot_dir}}" + +# Chroot environment +chroot_env=" +USER=root +HOME=/root +LOGNAME=root +PATH=:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +SHELL=/bin/sh +TERM=${TERM} +" -- 2.45.0