Skip to content

Commit 01c4513

Browse files
show avalible distros
1 parent 6fe223c commit 01c4513

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

scripts/udroid/udroid.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,34 @@ start() {
7171
}
7272

7373
l_login() {
74-
if [ -f "$LOGIN_CACHE_FILE" ]; then
74+
avalible_distros=$(find $D_INSTALLED_ROOTFS -maxdepth 1 -type d | grep udroid)
75+
76+
if [ -s "$LOGIN_CACHE_FILE" ]; then
7577
start "$(cat LOGIN_CACHE_FILE)"
78+
else
79+
lshout "No distro found in login cache.."
80+
# show avalible distros
81+
msg "${_c_blue}Available distros to login:"
82+
for distro in $avalible_distros; do
83+
msg " ${_c_magneta}$(basename $distro)${RST}"
84+
done
85+
msg
86+
87+
msg "${_c_blue}use ${_c_magneta}udroid -l <distro>${RST} to login"
88+
msg "ex: ${_c_magneta}udroid -l xfce4${RST}"
7689
fi
7790
}
7891

7992

8093
_install() {
8194
SUITE=$1
8295

96+
# make sure to satisy old docs
97+
if [ -z "$SUITE" ]; then
98+
imsg "falling back to defaults"
99+
SUITE="xfce4"
100+
fi
101+
83102
# relative path of plugins with respect to pd-plugins dir
84103
# set this when you need to install another suite
85104
if [ -n "$OVERRIDE_REMOTE_PLUGIN_DIR" ]; then

0 commit comments

Comments
 (0)