solarityliveboot/airootfs/usr/local/bin/cowspace-set

26 lines
424 B
Text
Raw Normal View History

2024-02-16 18:34:12 -05:00
#!/usr/bin/env bash
set -e
if [[ "$1" == "-h" || "$1" == "--help" || "$1" == "" ]]; then
cat <<EOF
Usage: $0 SIZE
Resizes the root of the live filesystem.
SIZE is an integer with optional unit.
Valid units are K,M,G,T,P, and E, denoting powers of 1024.
EOF
exit 0
fi
if [[ "$EUID" != 0 ]]; then
echo "Please run this script as root."
exit 1
fi
set -x
mount -o remount,size="$1" /run/archiso/cowspace