Last active
March 7, 2020 18:40
-
-
Save fredldotme/29b5176df53a16403559ae10bd8b5c8d to your computer and use it in GitHub Desktop.
Halium 7.1 Sparse Image Convert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| IMAGE_FILE="$1" | |
| IMAGE_FILE_REAL="$1.real" | |
| if [ ! -f "$IMAGE_FILE" ]; then | |
| echo "File $IMAGE_FILE doesn't exist" | |
| exit 1 | |
| fi | |
| if [ -f "$IMAGE_FILE_REAL" ]; then | |
| rm -f "$IMAGE_FILE_REAL" | |
| fi | |
| simg2img "$IMAGE_FILE" "$IMAGE_FILE_REAL" | |
| e2fsck -fy "$IMAGE_FILE_REAL" | |
| resize2fs -p -M "$IMAGE_FILE_REAL" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment