Skip to content

Commit

Permalink
Swap order, -v detects presence, not absence
Browse files Browse the repository at this point in the history
  • Loading branch information
ClashTheBunny committed Apr 13, 2024
1 parent eed2fa7 commit fe57b71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ function base_bootstrap() {
$SUDO rm "${MOUNTPOINT}/etc/hostname"
$SUDO rm "${MOUNTPOINT}/etc/apt/sources.list"
if [[ -v LOOPDEV ]]; then
ROOTUUID=$($SUDO blkid -s UUID -o export "${LOOPDEV}p2" | grep UUID)
BOOTUUID=$($SUDO blkid -s UUID -o export "${LOOPDEV}p1" | grep UUID)
else
ROOTUUID=/dev/mmcblk0p2
BOOTUUID=/dev/mmcblk0p1
else
ROOTUUID=$($SUDO blkid -s UUID -o export "${LOOPDEV:-error}p2" | grep UUID)
BOOTUUID=$($SUDO blkid -s UUID -o export "${LOOPDEV:-error}p1" | grep UUID)
fi
echo "proc /proc proc defaults 0 0
$BOOTUUID /boot vfat defaults 0 2
Expand Down

0 comments on commit fe57b71

Please sign in to comment.