From 6b84c53f72c020d989725581618cc52b6ba062f8 Mon Sep 17 00:00:00 2001 From: Dennis ten Hoove Date: Mon, 26 Aug 2024 11:35:58 +0200 Subject: [PATCH] [arkdep-build] Combine repo and suite in apt.conf --- arkdep-build | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/arkdep-build b/arkdep-build index 01a65a9..aaa9767 100755 --- a/arkdep-build +++ b/arkdep-build @@ -372,13 +372,16 @@ fi # Build debian type image if [[ $type == 'debian' ]]; then - # Get repo - declare -r deb_repo=$(cat $variantdir/repo 2> /dev/null) - - # Get branch - declare -r deb_suite=$(cat $variantdir/suite 2> /dev/null) - - echo $deb_repo $deb_suite + # Get repo configuration + if [[ ! -s $variant_dir/apt.conf ]]; then + cleanup_and_quite 'apt.conf expected but is empty or not found' + else + declare -r apt_conf=($(cat $variantdir/apt.conf 2> /dev/null)) + # 0. Repo URL (http://deb.debian.org/debian) + # 1. Suite (focal, sid, unstable etc..) + declare -r deb_repo=${apt_conf[0]} + declare -r deb_suite=${apt_conf[1]} + fi printf '\e[1;34m-->\e[0m\e[1m Started Debian image build\e[0m\n'