mirror of
https://github.com/Snigdha-OS/snigdhaos-pkgbuilds.git
synced 2025-09-20 19:45:00 +02:00
⚡️ perf(format): code and ensured consistent indentation for better readability
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Check if /proc/cmdline exists
|
||||||
if [[ -f /proc/cmdline ]]; then
|
if [[ -f /proc/cmdline ]]; then
|
||||||
|
# Check if booting from a Btrfs snapshot
|
||||||
if grep -qE 'subvol=@/.snapshots/[0-9]+/snapshot' /proc/cmdline; then
|
if grep -qE 'subvol=@/.snapshots/[0-9]+/snapshot' /proc/cmdline; then
|
||||||
echo "Booting from a Btrfs snapshot."
|
echo "Booting from a Btrfs snapshot."
|
||||||
exit 0
|
exit 0
|
||||||
@@ -9,6 +11,7 @@ if [[ -f /proc/cmdline ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "/proc/cmdline not found."
|
# Handle the case where /proc/cmdline is missing
|
||||||
|
echo "Error: /proc/cmdline not found."
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user