mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-01-01 03:21:41 +00:00
fix: Address substiutions never terminating during zram/deckswap resize
This commit is contained in:
parent
f5a3b6e3ba
commit
2830cfd786
@ -54,7 +54,7 @@ deckswap-off:
|
||||
resize-deckswap:
|
||||
#!/usr/bin/env bash
|
||||
CONFIG='/etc/default/deckswap'
|
||||
CURRENT_SIZE=$(cat "${CONFIG}" | sed 's/SWAP_SIZE=//')
|
||||
CURRENT_SIZE=$(cat "${CONFIG}" | sed 's/SWAP_SIZE=//g')
|
||||
echo 'Current size: '${CURRENT_SIZE}
|
||||
read -p 'Enter new size (1-16) in gigabytes (1G): ' NEW_SIZE
|
||||
if [ -z "${NEW_SIZE//[0-9]}" ]; then
|
||||
@ -96,7 +96,7 @@ zram-off:
|
||||
resize-zram:
|
||||
#!/usr/bin/env bash
|
||||
CONFIG='/etc/systemd/zram-generator.conf'
|
||||
CURRENT_SIZE=$(cat "${CONFIG}" | sed 's/zram-size=//')
|
||||
CURRENT_SIZE=$(cat "${CONFIG}" | sed 's/zram-size=//g')
|
||||
echo 'Current size: '${CURRENT_SIZE}
|
||||
read -p 'Enter new size (512-4096) in megabytes (1024): ' NEW_SIZE
|
||||
if [ -z "${NEW_SIZE//[0-9]}" ]; then
|
||||
|
@ -57,7 +57,7 @@ zram-off:
|
||||
resize-zram:
|
||||
#!/usr/bin/env bash
|
||||
CONFIG='/etc/systemd/zram-generator.conf'
|
||||
CURRENT_SIZE=$(cat "${CONFIG}" | sed 's/zram-size=//')
|
||||
CURRENT_SIZE=$(cat "${CONFIG}" | sed 's/zram-size=//g')
|
||||
echo 'Current size: '${CURRENT_SIZE}
|
||||
read -p 'Enter new size (512-4096) in megabytes (1024): ' NEW_SIZE
|
||||
if [ -z "${NEW_SIZE//[0-9]}" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user