]> code.delx.au - monosys/blob - sync-boot-mirror
aur-install: to /var/abs
[monosys] / sync-boot-mirror
1 #!/bin/bash
2
3 set -e
4
5 rsync -a --exclude=lost+found --delete /boot/ /boot-mirror/
6
7 function get_uuid {
8 eval $(grep "$1 " /etc/fstab | cut -d ' ' -f1)
9 echo "$UUID"
10 }
11
12 # Replace UUIDs so it can actually boot!
13 sed -i "s/$(get_uuid /boot)/$(get_uuid /boot-mirror)/g" \
14 $(find /boot-mirror/grub/ -name '*.cfg')
15