Skip to content

Commit 27bc860

Browse files
add help msgs
1 parent b27c482 commit 27bc860

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

udroid/src/help_udroid.sh

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,31 @@
11
#!/bin/bash
22

33
help_login() {
4+
# TODO: Add help for login
45
:
56
}
67

78
help_list() {
8-
:
9+
echo "udroid [ list| --list ] [options]"
10+
echo "options:"
11+
echo " -h, --help show this help message and exit"
12+
echo " --size show size of each distro"
13+
echo " --path <path> path to look for distros"
14+
echo " --list-installed show only installed distros"
915
}
1016

1117
help_install() {
12-
:
18+
echo "udroid [ install| --install ] <distro>"
19+
echo "installs udroid distros"
20+
echo "example:"
21+
echo " udroid install jammy:raw"
22+
echo " udroid install --install jammy:raw"
1323
}
1424

1525
help_remove() {
16-
:
26+
echo "udroid [ remove| --remove ] <distro>"
27+
echo "removes udroid distros"
28+
echo "example:"
29+
echo " udroid remove jammy:raw"
30+
echo " udroid remove --remove jammy:raw"
1731
}

udroid/src/udroid.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,7 @@ list() {
584584
--size) size=true; shift 1;;
585585
--list-installed) show_installed_only=true; shift 1;;
586586
--path) path=$2; LOG "list(): looking in $path"; shift 2;;
587+
--help) help_list; exit 0;;
587588
*) shift ;;
588589
esac
589590
done
@@ -659,6 +660,7 @@ remove() {
659660
--name) distro=$2; LOG "remove(): --name supplied to $name"; shift 2;;
660661
--path) path=$2; LOG "remove(): looking in $path"; shift 2;;
661662
--reset) reset=true; shift 1;;
663+
--help) help_remove; exit 0;;
662664
*)
663665
[[ -n $distro ]] && {
664666
ELOG "remove() error: name already set to $distro"

0 commit comments

Comments
 (0)