summaryrefslogtreecommitdiff
path: root/liveusb/build.sh
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2014-12-06 22:44:27 +0100
committerYuval Adam <yuv.adm@gmail.com>2014-12-06 22:44:27 +0100
commit56a4469199a54800f6d0c48255ee02a3c48adaa3 (patch)
tree2029308f824a57c068017763db06a38ddb5c7675 /liveusb/build.sh
parentd7529256578dc763dca234d2a5f205ef9181bc29 (diff)
Initial extra package support, test on figlet
Diffstat (limited to 'liveusb/build.sh')
-rwxr-xr-xliveusb/build.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/liveusb/build.sh b/liveusb/build.sh
index e0663a0..be18c69 100755
--- a/liveusb/build.sh
+++ b/liveusb/build.sh
@@ -10,6 +10,7 @@ arch=$(uname -m)
work_dir=work
out_dir=out
+pacman_conf=${work_dir}/pacman.conf
script_path=$(readlink -f ${0%/*})
# Helper function to run make_*() only one time per architecture.
@@ -20,9 +21,21 @@ run_once() {
fi
}
+# Setup custom pacman.conf with current cache directories.
+make_pacman_conf() {
+ local _cache_dirs
+ _cache_dirs=($(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g'))
+ sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${_cache_dirs[@]})|g" ${script_path}/pacman.conf > ${pacman_conf}
+}
+
# Base installation (airootfs)
make_basefs() {
- mkarchiso -v -w "${work_dir}" -D "${install_dir}" init
+ mkarchiso -v -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" init
+}
+
+# Additional packages (airootfs)
+make_packages() {
+ mkarchiso -v -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -p "$(grep -h -v ^# ${script_path}/packages.x86_64)" install
}
# Copy mkinitcpio archiso hooks and build initramfs (airootfs)
@@ -73,6 +86,7 @@ make_iso() {
}
run_once make_basefs
+run_once make_packages
run_once make_setup_mkinitcpio
run_once make_boot
run_once make_syslinux