summaryrefslogtreecommitdiff
path: root/configs/profile
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2020-03-27 19:25:50 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2020-03-27 19:32:36 -0400
commit95d09a997e195536b86511c333efe4960068ef63 (patch)
treedf71f35673a84a0469cc1bc1ce0ec8305dbbca3f /configs/profile
parent00bae7c58cacd29b15d0bb65858ac3b7a537cf95 (diff)
refactor cached packages into command_cache() fn
Diffstat (limited to 'configs/profile')
-rwxr-xr-xconfigs/profile/build.sh18
1 files changed, 8 insertions, 10 deletions
diff --git a/configs/profile/build.sh b/configs/profile/build.sh
index c26982a..3a49a8a 100755
--- a/configs/profile/build.sh
+++ b/configs/profile/build.sh
@@ -17,6 +17,7 @@ iso_version=$(date +%Y.%m.%d)
iso_label="PARA_$(date +%Y%m)"
iso_dirname='parabola'
enable_offline_install='false'
+offline_switch=''
work_dir=./work
out_dir=./out
target=''
@@ -137,7 +138,7 @@ make_packages() {
if [[ "$enable_offline_install" == 'true' ]]; then
if [[ -n ${_cache_packages} ]]; then
# download any cache packages and prune obsolete packages
- cache_only='true' setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} -C ${pacman_conf} -D ${iso_dirname} -p "${_cache_packages}" -O install
+ setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} -C ${pacman_conf} -D ${iso_dirname} -p "${_cache_packages}" ${offline_switch} cache
fi
# create 'isorepo' for offline install
pushd ${work_dir}/${arch}/root-image/isorepo > /dev/null
@@ -164,7 +165,6 @@ make_setup_mkinitcpio() {
# Customize installation (root-image)
make_customize_root_image() {
- [[ "$enable_offline_install" == 'true' ]] && offline='-O' || offline=''
cp -af ${releng_dir}/root-image ${work_dir}/${arch}
@@ -177,7 +177,7 @@ make_customize_root_image() {
setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} \
-C ${pacman_conf} \
-D ${iso_dirname} \
- ${offline} \
+ ${offline_switch} \
-r /root/customize_root_image.sh \
run
rm ${work_dir}/${arch}/root-image/root/customize_root_image*
@@ -310,11 +310,9 @@ make_aitab() {
# Build all filesystem images specified in aitab (.fs.sfs .sfs)
make_prepare() {
- [[ "$enable_offline_install" == 'true' ]] && offline='-O' || offline=''
-
cp -a -l -f ${work_dir}/${arch}/root-image ${work_dir}
setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir} -D ${iso_dirname} pkglist
- setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir} -D ${iso_dirname} -C ${pacman_conf} ${offline} prepare
+ setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir} -D ${iso_dirname} -C ${pacman_conf} ${offline_switch} prepare
rm -rf ${work_dir}/root-image
# rm -rf ${work_dir}/${arch}/root-image (if low space, this helps)
@@ -337,7 +335,7 @@ while getopts 'E:T:V:L:D:OC:w:o:vh' arg; do
V) iso_version="${OPTARG}" ;;
L) iso_label="${OPTARG}" ;;
D) iso_dirname="${OPTARG}" ;;
- O) enable_offline_install='true' ;;
+ O) enable_offline_install='true' offline_switch='-O' ;;
C) pacman_conf="${OPTARG}" ;;
w) work_dir="${OPTARG}" ;;
o) out_dir="${OPTARG}" ;;
@@ -363,12 +361,12 @@ case "${target}" in
esac
if [[ "$enable_offline_install" == 'true' ]]; then
iso_type='complete'
- launch_msg="${launch_msg} (net-install or offline install)"
+ launch_msg="${launch_msg} (offline install enabled)"
else
iso_type='netinstall'
- launch_msg="${launch_msg} (net-install only)"
+ launch_msg="${launch_msg} (net install only)"
fi
-iso_title="${iso_title} ${iso_edition} Edition ${iso_version}"
+iso_title="${iso_title} - ${iso_edition} Edition ${iso_version}"
iso_filename="parabola-${iso_edition}-${iso_arch}-${iso_type}-${iso_version}.iso"
iso_filename=$(echo ${iso_filename} | tr '[:upper:]/' '[:lower:]-')
iso_init=$(echo ${iso_edition} | cut -d '/' -f 1 | tr '[:upper:]' '[:lower:]')