Skip to content

Commit 6e18900

Browse files
committed
Added usage for armmanager
1 parent 6b1d6aa commit 6e18900

File tree

2 files changed

+37
-3
lines changed

2 files changed

+37
-3
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
.wpath
33
.idea
44
prepared-executables/
5-
.vscode
5+
.vscode
6+
*.pyc

iso_script/armmanager.sh

+35-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,40 @@
22

33
#Usage function to print how to use
44
usage() {
5-
echo "armmanager [-m=<file>] [-u[=<destination>]] [-o=<destination>]"
5+
echo "Usage : armmanager [OPTIONS] ... [FILE]"
6+
echo "Mount, modify and chroot into an ISO image of a Raspberry pi"
7+
echo ""
8+
echo -e "Best use example : \e[1m./armmanager -m -r -c /path/to/image\e[0m"
9+
echo ""
10+
echo "Available options are :"
11+
echo " -m, --mountfile Option to mount a given ISO file. Be sure to give a raspberry system file."
12+
echo " -mo, --mount-only Option to specify, when mounting, that we only want to mount."
13+
echo " If not given, it will proceed everything to prepare chroot with qemu (copying qemu files...)."
14+
echo " -u, --umount"
15+
echo " -u=[DEST], --umount=[DEST]"
16+
echo " Option to umount a mounted Raspberry pi filesystem. If no directory is precised,"
17+
echo " it will automatically umount last mounted one. Prefer using this script to unmount filesystems mounted"
18+
echo " with this script."
19+
echo " -o=[DEST], --output=[DEST] "
20+
echo " If precised it will output the image filesystem to this destination. If not, image will be mounted"
21+
echo " to ./.armmanager directory in the same directory as the script."
22+
echo " -c, --chroot"
23+
echo " -c=[DEST], --chroot=[DEST]"
24+
echo " Permits to chroot in a Raspberry filesystem. If no destination is given, it will chroot into the last"
25+
echo " mounted filesystem."
26+
echo " -co=[OPTIONS], --chroot-options=[OPTIONS]"
27+
echo " When chrooting into a filesystem, the script launches a second script which aims to prepare to raspberry"
28+
echo " system. You can pass options to this script through this option"
29+
echo " Options are : chroot-only, install-only, upgrade-clean, no-update, no-daemon, no-kernel-recompile"
30+
echo " -r, --resize-image"
31+
echo -e " -r=[SIZE], --resize-image=[SIZE] \e[1m[DO NOT USE (not tested)]\e[0m"
32+
echo " Option to extend the partition of an image. By default adds 1Go to the main partition."
33+
echo " -h, --help Print this help menu."
34+
echo -e " --pidora Option to precise that the Raspberry image is a PIDORA system. \e[1m/!\ Not fully tested /!\\e[0m"
35+
echo ""
36+
echo "Do not hesitate to report bugs to <[email protected]>"
37+
echo "Full project available on GitHub at <https://github.com/Pravez/GrapeCluster>"
38+
echo "Thank you for using this script !"
639
}
740

841
realpath() {
@@ -60,7 +93,7 @@ resize_image() {
6093
part=$(fdisk -l -o Start $FILE | cut -d' ' -f1,3 | tail -n1)
6194
offset=$((512 * $part))
6295

63-
truncate -s +1G $FILE
96+
truncate -s +$RESIZE_VALUE $FILE
6497
rootasked "Losetup"
6598
sudo losetup /dev/loop0 $FILE
6699

0 commit comments

Comments
 (0)