Drop all the readlinks, filepath is already clean

This commit is contained in:
Dennis ten Hoove 2024-02-29 10:33:41 +01:00
parent c6af66c571
commit 97ee325eb7

124
arkdep
View file

@ -48,7 +48,7 @@ fi
## Set common variables ## Set common variables
# #
declare -r arkdep_dir="$(readlink -m $ARKDEP_ROOT/arkdep/)" declare -r arkdep_dir="$(readlink -m $ARKDEP_ROOT/arkdep)"
# Override arkdep_boot if set, if not assume located inside of root # Override arkdep_boot if set, if not assume located inside of root
if [[ -n $ARKDEP_BOOT ]]; then if [[ -n $ARKDEP_BOOT ]]; then
@ -68,7 +68,7 @@ fi
## Load config file, unless we are running init ## Load config file, unless we are running init
# #
if [[ ! $1 == 'init' ]]; then if [[ ! $1 == 'init' ]]; then
source $(readlink -m $arkdep_dir/config) source $arkdep_dir/config
# Set default variables if config variables are undefined # Set default variables if config variables are undefined
[[ -z ${enable_overlay+x} ]] && enable_overlay=1 && printf '\e[1;33m<!>\e[0m\e[1m enable_overlay not defined in config, using default\e[0m\n' [[ -z ${enable_overlay+x} ]] && enable_overlay=1 && printf '\e[1;33m<!>\e[0m\e[1m enable_overlay not defined in config, using default\e[0m\n'
@ -103,14 +103,14 @@ cleanup_and_quit () {
# Remove the subvolume we were working on # Remove the subvolume we were working on
# TODO: Make this a generic function and share with the removal of old images? # TODO: Make this a generic function and share with the removal of old images?
if [[ -n ${data[0]} ]]; then if [[ -n ${data[0]} ]]; then
btrfs property set -f -ts $(readlink -m $arkdep_dir/deployments/${data[0]}/rootfs/etc) ro false btrfs property set -f -ts $arkdep_dir/deployments/${data[0]}/rootfs/etc ro false
btrfs property set -f -ts $(readlink -m $arkdep_dir/deployments/${data[0]}/rootfs) ro false btrfs property set -f -ts $arkdep_dir/deployments/${data[0]}/rootfs ro false
btrfs subvolume delete $(readlink -m $arkdep_dir/deployments/${data[0]}/rootfs/etc) btrfs subvolume delete $arkdep_dir/deployments/${data[0]}/rootfs/etc
btrfs subvolume delete $(readlink -m $arkdep_dir/deployments/${data[0]}/rootfs) btrfs subvolume delete $arkdep_dir/deployments/${data[0]}/rootfs
rm -rfv $(readlink -m $arkdep_dir/deployments/${data[0]}) \ rm -rfv $arkdep_dir/deployments/${data[0]} \
$(readlink -m $arkdep_boot/arkdep/${data[0]}) $arkdep_boot/arkdep/${data[0]}
rm -v $(readlink -m $arkdep_dir/cache/${data[0]}-*.img) \ rm -v $arkdep_dir/cache/${data[0]}-*.img \
$(readlink -m $arkdep_boot/loader/entries/${data[0]}.conf) $arkdep_boot/loader/entries/${data[0]}.conf
fi fi
exit 1 exit 1
@ -163,7 +163,7 @@ healthcheck () {
# Warn if gpg check is enabled but no keys are installed # Warn if gpg check is enabled but no keys are installed
if [[ ! $gpg_signature_check -eq 0 ]] && [[ ! -s $arkdep_dir/keys/trusted-keys ]]; then if [[ ! $gpg_signature_check -eq 0 ]] && [[ ! -s $arkdep_dir/keys/trusted-keys ]]; then
printf "\e[1;33m<!>\e[0m\e[1m gpg_signature_check is enabled but $(readlink -m $arkdep_dir/keys/trusted-keys) does not exist or is empty\n\e[0m" printf "\e[1;33m<!>\e[0m\e[1m gpg_signature_check is enabled but $arkdep_dir/keys/trusted-keys does not exist or is empty\n\e[0m"
fi fi
# If $1 is healthcheck it was manually called by the user # If $1 is healthcheck it was manually called by the user
@ -203,9 +203,9 @@ done
# Ensure minimum required storage is available, only run if new deployment will be made # Ensure minimum required storage is available, only run if new deployment will be made
if [[ $1 == 'deploy' ]]; then if [[ $1 == 'deploy' ]]; then
declare boot_storage_available=($(df --output=avail $(readlink -m $arkdep_boot))) declare boot_storage_available=($(df --output=avail $arkdep_boot))
boot_storage_available=${boot_storage_available[1]} boot_storage_available=${boot_storage_available[1]}
declare root_storage_available=($(df --output=avail $(readlink -m $ARKDEP_ROOT/))) declare root_storage_available=($(df --output=avail $ARKDEP_ROOT/))
root_storage_available=${root_storage_available[1]} root_storage_available=${root_storage_available[1]}
# Check amount of available boot storage, do not run if set to 0 # Check amount of available boot storage, do not run if set to 0
@ -244,22 +244,22 @@ init () {
# Create directory structure # Create directory structure
printf '\e[1;34m-->\e[0m\e[1m Creating directory structure\e[0m\n' printf '\e[1;34m-->\e[0m\e[1m Creating directory structure\e[0m\n'
mkdir -pv $(readlink -m $arkdep_dir/deployments) \ mkdir -pv $arkdep_dir/deployments \
$(readlink -m $arkdep_dir/deployments) \ $arkdep_dir/deployments \
$(readlink -m $arkdep_dir/cache) \ $arkdep_dir/cache \
$(readlink -m $arkdep_dir/templates) \ $arkdep_dir/templates \
$(readlink -m $arkdep_dir/overlay) \ $arkdep_dir/overlay \
$(readlink -m $arkdep_dir/keys) \ $arkdep_dir/keys \
$(readlink -m $arkdep_dir/shared) || $arkdep_dir/shared ||
cleanup_and_quit "Failed to create $arkdep_dir and related directories" cleanup_and_quit "Failed to create $arkdep_dir and related directories"
# Create empty database files # Create empty database files
touch $(readlink -m $arkdep_dir/tracker) touch $arkdep_dir/tracker
touch $(readlink -m $arkdep_dir/keys/trusted-keys) touch $arkdep_dir/keys/trusted-keys
# Add home shared subvolume and make writable # Add home shared subvolume and make writable
btrfs subvolume create $(readlink -m $arkdep_dir/shared/home) || cleanup_and_quit "Failed to create home subvolume" btrfs subvolume create $arkdep_dir/shared/home || cleanup_and_quit "Failed to create home subvolume"
btrfs property set -f -ts $(readlink -m $arkdep_dir/shared/home) ro false btrfs property set -f -ts $arkdep_dir/shared/home ro false
# Write default config file # Write default config file
printf '\e[1;34m-->\e[0m\e[1m Adding default config file\e[0m\n' printf '\e[1;34m-->\e[0m\e[1m Adding default config file\e[0m\n'
@ -341,10 +341,10 @@ teardown () {
fi fi
# Remove all bootloader entries # Remove all bootloader entries
rm -v $(grep -ril arkdep $(readlink -m $arkdep_boot/loader/entries)) rm -v $(grep -ril arkdep $arkdep_boot/loader/entries)
# Remove kernels and initramfs deployed by Arkdep # Remove kernels and initramfs deployed by Arkdep
rm -rfv $(readlink -m $arkdep_boot/arkdep) rm -rfv $arkdep_boot/arkdep
# Ensure all nested volumes in arkdep are writable and remove # Ensure all nested volumes in arkdep are writable and remove
for volume in $(btrfs subvolume list / | grep -oE '[^ ]+$' | grep "^$arkdep_dir" | tac); do for volume in $(btrfs subvolume list / | grep -oE '[^ ]+$' | grep "^$arkdep_dir" | tac); do
@ -396,14 +396,14 @@ remove_deployment () {
declare -r target="${hits[0]}" declare -r target="${hits[0]}"
# Ensure deployment is not currently active # Ensure deployment is not currently active
if grep -q "$(readlink -m $arkdep_dir/deployments/$target/rootfs)" /proc/cmdline; then if grep -q "$arkdep_dir/deployments/$target/rootfs" /proc/cmdline; then
printf 'Target is currently active deployment\n' printf 'Target is currently active deployment\n'
exit 1 exit 1
fi fi
# Remove bootloader entry # Remove bootloader entry
rm -rfv $(readlink -m $arkdep_boot/loader/entries/$target.conf) rm -rfv $arkdep_boot/loader/entries/$target.conf
rm -rfv $(readlink -m $arkdep_boot/arkdep/$target) rm -rfv $arkdep_boot/arkdep/$target
# Ensure the deployment and all sub-volumes are writable # Ensure the deployment and all sub-volumes are writable
for volume in $(btrfs subvolume list / | grep -oE '[^ ]+$' | grep $target); do for volume in $(btrfs subvolume list / | grep -oE '[^ ]+$' | grep $target); do
@ -411,7 +411,7 @@ remove_deployment () {
done done
# Remove the deployment # Remove the deployment
rm -rf $(readlink -m $arkdep_dir/deployments/$target) rm -rf $arkdep_dir/deployments/$target
# Remove from tracker # Remove from tracker
grep -v $1 $arkdep_dir/tracker > $arkdep_dir/tracker_tmp grep -v $1 $arkdep_dir/tracker > $arkdep_dir/tracker_tmp
@ -432,7 +432,7 @@ remove_deployment () {
if [[ $clean_cache_on_remove -eq 1 ]]; then if [[ $clean_cache_on_remove -eq 1 ]]; then
# Only attempt remove if file exists # Only attempt remove if file exists
if ls $arkdep_dir/cache/ | grep $1; then if ls $arkdep_dir/cache/ | grep $1; then
rm -v $(readlink -m $arkdep_dir/cache/$1.tar.*) rm -v $arkdep_dir/cache/$1.tar.*
fi fi
fi fi
@ -492,7 +492,7 @@ deploy () {
else else
# Find full name in cache, exclude sig files, if no hit quit with error # Find full name in cache, exclude sig files, if no hit quit with error
declare cache_hits=($(ls $(readlink -m $arkdep_dir/cache) | grep -E "^$deploy_version" | grep -v '.sig$')) declare cache_hits=($(ls $arkdep_dir/cache | grep -E "^$deploy_version" | grep -v '.sig$'))
# Temporary var to store the delimited file found in cache # Temporary var to store the delimited file found in cache
declare data_inter=() declare data_inter=()
@ -548,7 +548,7 @@ deploy () {
printf "\e[1;34m-->\e[0m\e[1m Downloading disk image\e[0m\n" printf "\e[1;34m-->\e[0m\e[1m Downloading disk image\e[0m\n"
# Download the tarball if not yet downloaded # Download the tarball if not yet downloaded
if [[ ! -e $arkdep_dir/cache/${data[0]}.tar.${data[1]} ]]; then if [[ ! -e $arkdep_dir/cache/${data[0]}.tar.${data[1]} ]]; then
wget -q --show-progress -P $(readlink -m $arkdep_dir/cache/) "$repo_url/$deploy_target/${data[0]}.tar.${data[1]}" || wget -q --show-progress -P $arkdep_dir/cache/ "$repo_url/$deploy_target/${data[0]}.tar.${data[1]}" ||
cleanup_and_quit 'Failed to download tarball' cleanup_and_quit 'Failed to download tarball'
# Download GPG signature, only perform check if not disabled by user and keychain exists # Download GPG signature, only perform check if not disabled by user and keychain exists
@ -556,7 +556,7 @@ deploy () {
# Download gpg signature if not yet in cache # Download gpg signature if not yet in cache
if [[ ! -s $arkdep_dir/cache/${data[0]}.tar.${data[1]}.sig ]]; then if [[ ! -s $arkdep_dir/cache/${data[0]}.tar.${data[1]}.sig ]]; then
wget -q --show-progress -P $(readlink -m $arkdep_dir/cache/) "$repo_url/$deploy_target/${data[0]}.tar.${data[1]}.sig" wget -q --show-progress -P $arkdep_dir/cache/ "$repo_url/$deploy_target/${data[0]}.tar.${data[1]}.sig"
sig_exitcode=$? sig_exitcode=$?
fi fi
@ -590,7 +590,7 @@ deploy () {
elif [[ ${data[2]} != '-' ]]; then elif [[ ${data[2]} != '-' ]]; then
# If GPG check not triggered instead check hash, unless defined as - # If GPG check not triggered instead check hash, unless defined as -
printf '\e[1;34m-->\e[0m\e[1m Validating integrity\e[0m\n' printf '\e[1;34m-->\e[0m\e[1m Validating integrity\e[0m\n'
sha1sum "$(readlink -m $arkdep_dir/cache/${data[0]}.tar.${data[1]})" | sha1sum $arkdep_dir/cache/${data[0]}.tar.${data[1]} |
grep "${data[2]}" || grep "${data[2]}" ||
cleanup_and_quit "Checksum does not match the one defined in database\e[0m\n" cleanup_and_quit "Checksum does not match the one defined in database\e[0m\n"
fi fi
@ -599,48 +599,48 @@ deploy () {
printf '\e[1;34m-->\e[0m\e[1m Writing root\e[0m\n' printf '\e[1;34m-->\e[0m\e[1m Writing root\e[0m\n'
# Create directory using unique deployment name # Create directory using unique deployment name
mkdir -pv $(readlink -m $arkdep_dir/deployments/${data[0]}) || cleanup_and_quit 'Failed to create deployment directory' mkdir -pv $arkdep_dir/deployments/${data[0]} || cleanup_and_quit 'Failed to create deployment directory'
if [[ ! -e $arkdep_dir/cache/${data[0]}-rootfs.img ]]; then if [[ ! -e $arkdep_dir/cache/${data[0]}-rootfs.img ]]; then
tar -xf $(readlink -m $arkdep_dir/cache/${data[0]}.tar.${data[1]}) -C $(readlink -m $arkdep_dir/cache/) "./${data[0]}-rootfs.img" || tar -xf $arkdep_dir/cache/${data[0]}.tar.${data[1]} -C $arkdep_dir/cache/ "./${data[0]}-rootfs.img" ||
cleanup_and_quit 'Failed to extract root' cleanup_and_quit 'Failed to extract root'
fi fi
# Write the root image # Write the root image
btrfs receive -f $(readlink -m $arkdep_dir/cache/${data[0]}-rootfs.img) $(readlink -m $arkdep_dir/deployments/${data[0]}) || btrfs receive -f $arkdep_dir/cache/${data[0]}-rootfs.img $arkdep_dir/deployments/${data[0]} ||
cleanup_and_quit 'Failed to receive root' cleanup_and_quit 'Failed to receive root'
# Cleanup root image # Cleanup root image
rm $(readlink -m $arkdep_dir/cache/${data[0]}-rootfs.img) rm $arkdep_dir/cache/${data[0]}-rootfs.img
# Extract the etc image if not yet extracted # Extract the etc image if not yet extracted
printf '\e[1;34m-->\e[0m\e[1m Writing etc\e[0m\n' printf '\e[1;34m-->\e[0m\e[1m Writing etc\e[0m\n'
if [[ ! -e $arkdep_dir/cache/${data[0]}-etc.img ]]; then if [[ ! -e $arkdep_dir/cache/${data[0]}-etc.img ]]; then
tar -xf $(readlink -m $arkdep_dir/cache/${data[0]}.tar.${data[1]}) -C $(readlink -m $arkdep_dir/cache/) "./${data[0]}-etc.img" || tar -xf $arkdep_dir/cache/${data[0]}.tar.${data[1]} -C $arkdep_dir/cache/ "./${data[0]}-etc.img" ||
cleanup_and_quit 'failed to extract etc' cleanup_and_quit 'failed to extract etc'
fi fi
# Write the etc image and create var directory, we have to unlock rootfs temporarily to do this # Write the etc image and create var directory, we have to unlock rootfs temporarily to do this
btrfs property set -f -ts $(readlink -m $arkdep_dir/deployments/${data[0]}/rootfs) ro false || btrfs property set -f -ts $arkdep_dir/deployments/${data[0]}/rootfs ro false ||
cleanup_and_quit 'Failed to unlock root to write etc' cleanup_and_quit 'Failed to unlock root to write etc'
btrfs receive -f $(readlink -m $arkdep_dir/cache/${data[0]}-etc.img) $(readlink -m $arkdep_dir/deployments/${data[0]}/rootfs/) || btrfs receive -f $arkdep_dir/cache/${data[0]}-etc.img $arkdep_dir/deployments/${data[0]}/rootfs/ ||
cleanup_and_quit 'Failed to receive etc' cleanup_and_quit 'Failed to receive etc'
printf '\e[1;34m-->\e[0m\e[1m Ensure var, root and arkdep mountpoints exist\e[0m\n' printf '\e[1;34m-->\e[0m\e[1m Ensure var, root and arkdep mountpoints exist\e[0m\n'
mkdir -pv $(readlink -m $arkdep_dir/deployments/${data[0]}/rootfs/var) mkdir -pv $arkdep_dir/deployments/${data[0]}/rootfs/var
mkdir -pv $(readlink -m $arkdep_dir/deployments/${data[0]}/rootfs/arkdep) mkdir -pv $arkdep_dir/deployments/${data[0]}/rootfs/arkdep
# Lock the root volume again # Lock the root volume again
btrfs property set -f -ts $(readlink -m $arkdep_dir/deployments/${data[0]}/rootfs) ro true || btrfs property set -f -ts $arkdep_dir/deployments/${data[0]}/rootfs ro true ||
cleanup_and_quit 'Failed to lock root' cleanup_and_quit 'Failed to lock root'
# Unlock the etc deployment # Unlock the etc deployment
btrfs property set -f -ts $(readlink -m $arkdep_dir/deployments/${data[0]}/rootfs/etc) ro false || btrfs property set -f -ts $arkdep_dir/deployments/${data[0]}/rootfs/etc ro false ||
cleanup_and_quit 'Failed to unlock root to write etc' cleanup_and_quit 'Failed to unlock root to write etc'
# Cleanup etc image # Cleanup etc image
rm $(readlink -m $arkdep_dir/cache/${data[0]}-etc.img) rm $arkdep_dir/cache/${data[0]}-etc.img
# Write the var image # Write the var image
if [[ ! -e $arkdep_dir/shared/var ]]; then if [[ ! -e $arkdep_dir/shared/var ]]; then
@ -648,11 +648,11 @@ deploy () {
# Extract the var image if not yet extracted # Extract the var image if not yet extracted
if [[ ! -e $arkdep_dir/cache/${data[0]}-var.img ]]; then if [[ ! -e $arkdep_dir/cache/${data[0]}-var.img ]]; then
tar -xf $(readlink -m $arkdep_dir/cache/${data[0]}.tar.${data[1]}) -C $(readlink -m $arkdep_dir/cache/) "./${data[0]}-var.img" || tar -xf $arkdep_dir/cache/${data[0]}.tar.${data[1]} -C $arkdep_dir/cache/ "./${data[0]}-var.img" ||
cleanup_and_quit 'failed to extract var' cleanup_and_quit 'failed to extract var'
fi fi
btrfs receive -f $(readlink -m $arkdep_dir/cache/${data[0]}-var.img) $(readlink -m $arkdep_dir/shared/) || btrfs receive -f $arkdep_dir/cache/${data[0]}-var.img $arkdep_dir/shared/ ||
cleanup_and_quit 'Failed to receive var' cleanup_and_quit 'Failed to receive var'
else else
# Notify if var is not deployed # Notify if var is not deployed
@ -660,11 +660,11 @@ deploy () {
fi fi
# Make var writable # Make var writable
btrfs property set -f -ts $(readlink -m $arkdep_dir/shared/var) ro false || btrfs property set -f -ts $arkdep_dir/shared/var ro false ||
cleanup_and_quit 'Failed to unlock var' cleanup_and_quit 'Failed to unlock var'
# Cleanup var image # Cleanup var image
rm $(readlink -m $arkdep_dir/cache/${data[0]}-var.img) rm $arkdep_dir/cache/${data[0]}-var.img
# Add overlay if enabled # Add overlay if enabled
if [[ $enable_overlay -eq 1 ]]; then if [[ $enable_overlay -eq 1 ]]; then
@ -698,23 +698,23 @@ deploy () {
# Unlock root if required # Unlock root if required
if [[ $overlay_unlock_root -eq 1 ]]; then if [[ $overlay_unlock_root -eq 1 ]]; then
btrfs property set -f -ts $(readlink -m $arkdep_dir/deployments/${data[0]}) ro false btrfs property set -f -ts $arkdep_dir/deployments/${data[0]} ro false
fi fi
cp -rv $(readlink -m $arkdep_dir/overlay/*) $(readlink -m /$arkdep_dir/deployments/${data[0]}/rootfs/) cp -rv $arkdep_dir/overlay/* $arkdep_dir/deployments/${data[0]}/rootfs/
# Lock root again if required # Lock root again if required
if [[ $overlay_unlock_root -eq 1 ]]; then if [[ $overlay_unlock_root -eq 1 ]]; then
btrfs property set -f -ts $(readlink -m $arkdep_dir/deployments/${data[0]}) ro true btrfs property set -f -ts $arkdep_dir/deployments/${data[0]} ro true
fi fi
fi fi
printf '\e[1;34m-->\e[0m\e[1m Copying kernel image\e[0m\n' printf '\e[1;34m-->\e[0m\e[1m Copying kernel image\e[0m\n'
# Get list of all available kernels # Get list of all available kernels
kernels_installed=($(ls $arkdep_dir/deployments/${data[0]}/rootfs/usr/lib/modules/)) kernels_installed=($(ls $arkdep_dir/deployments/${data[0]}/rootfs/usr/lib/modules/))
mkdir -pv $(readlink -m $arkdep_boot/arkdep/${data[0]}) mkdir -pv $arkdep_boot/arkdep/${data[0]}
# Deploy kernel to /boot, deploy first hit of kernels_installed # Deploy kernel to /boot, deploy first hit of kernels_installed
cp -v $(readlink -m $arkdep_dir/deployments/${data[0]}/rootfs/usr/lib/modules/${kernels_installed[0]}/vmlinuz) $(readlink -m $arkdep_boot/arkdep/${data[0]}/) || cp -v $arkdep_dir/deployments/${data[0]}/rootfs/usr/lib/modules/${kernels_installed[0]}/vmlinuz) $arkdep_boot/arkdep/${data[0]}/ ||
cleanup_and_quit 'Failed to copy kernel image' cleanup_and_quit 'Failed to copy kernel image'
# Deploy CPU firmware to boot # Deploy CPU firmware to boot
@ -723,8 +723,8 @@ deploy () {
for ucode in $(ls $arkdep_dir/deployments/${data[0]}/rootfs/usr/lib/ | grep ucode); do for ucode in $(ls $arkdep_dir/deployments/${data[0]}/rootfs/usr/lib/ | grep ucode); do
# If CPU firmware present in both image and install # If CPU firmware present in both image and install
if ! cmp --silent $(readlink -m $arkdep_boot/$ucode) $arkdep_dir/deployments/${data[0]}/rootfs/usr/lib/$ucode; then if ! cmp --silent $arkdep_boot/$ucode $arkdep_dir/deployments/${data[0]}/rootfs/usr/lib/$ucode; then
cp -v $(readlink -m $arkdep_dir/deployments/${data[0]}/rootfs/usr/lib/$ucode) $(readlink -m $arkdep_boot/$ucode) || cp -v $arkdep_dir/deployments/${data[0]}/rootfs/usr/lib/$ucode $arkdep_boot/$ucode ||
cleanup_and_quit 'Failed to copy microcode' cleanup_and_quit 'Failed to copy microcode'
fi fi
done done
@ -733,11 +733,11 @@ deploy () {
# Install kernel and generate initramfs # Install kernel and generate initramfs
printf '\e[1;34m-->\e[0m\e[1m Generating initramfs\e[0m\n' printf '\e[1;34m-->\e[0m\e[1m Generating initramfs\e[0m\n'
dracut -q -k $(readlink -m $arkdep_dir/deployments/${data[0]}/rootfs/usr/lib/modules/${kernels_installed[0]}) \ dracut -q -k $arkdep_dir/deployments/${data[0]}/rootfs/usr/lib/modules/${kernels_installed[0]} \
--kernel-image $(readlink -m $arkdep_boot/arkdep/${data[0]}/vmlinuz) \ --kernel-image $arkdep_boot/arkdep/${data[0]}/vmlinuz \
--kver ${kernels_installed[0]} \ --kver ${kernels_installed[0]} \
--force \ --force \
$(readlink -m $arkdep_boot/arkdep/${data[0]}/initramfs-linux.img) || cleanup_and_quit 'Failed to generate initramfs' $arkdep_boot/arkdep/${data[0]}/initramfs-linux.img || cleanup_and_quit 'Failed to generate initramfs'
# Add to database # Add to database
printf '\e[1;34m-->\e[0m\e[1m Updating database\e[0m\n' printf '\e[1;34m-->\e[0m\e[1m Updating database\e[0m\n'
@ -748,7 +748,7 @@ deploy () {
# Deploy bootloader configuration # Deploy bootloader configuration
# also insert newline # also insert newline
printf '\n\e[1;34m-->\e[0m\e[1m Adding bootloader entry\e[0m\n' printf '\n\e[1;34m-->\e[0m\e[1m Adding bootloader entry\e[0m\n'
sed "s/%target%/${data[0]}/" $arkdep_dir/templates/systemd-boot > $(readlink -m $arkdep_boot/loader/entries/${data[0]}.conf) sed "s/%target%/${data[0]}/" $arkdep_dir/templates/systemd-boot > $arkdep_boot/loader/entries/${data[0]}.conf
# Set new deployment as default bootloader entry # Set new deployment as default bootloader entry
printf '\e[1;34m-->\e[0m\e[1m Setting new bootloader entry as default\e[0m\n' printf '\e[1;34m-->\e[0m\e[1m Setting new bootloader entry as default\e[0m\n'