Skip to content

Commit 4b33f39

Browse files
committed
add function is_installed
1 parent 31aad48 commit 4b33f39

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

scripts/udroid/udroid.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,20 @@ _install() {
6868
proot-distro install $final_suite
6969
}
7070

71+
is_installed() {
72+
target_suite=$1
73+
74+
if [ ! -f "${D_SCRIPTS}/${target_suite}.sh" ]; then
75+
return 1
76+
fi
77+
78+
if [ ! -d "${D_INSTALLED_ROOTFS}/${target_suite}.sh" ]; then
79+
return 1
80+
fi
81+
82+
return 0
83+
}
84+
7185
l_cache() {
7286
if [ ! -d ${HOME}/.udroid ]; then
7387
mkdir ${HOME}/.udroid

0 commit comments

Comments
 (0)