Skip to content

Commit 2bb4763

Browse files
[experimental]: remove for custom-fs
1 parent eabea11 commit 2bb4763

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

udroid/src/udroid.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,7 @@ remove() {
10201020
case $1 in
10211021
--name) distro=$2; LOG "remove(): --name supplied to $name"; shift 2;;
10221022
--path) path=$2; LOG "remove(): looking in $path"; shift 2;;
1023+
--custom|--custom-distro|-cd) custom_remove $@ ;;
10231024
--reset) reset=true; shift 1;;
10241025
--help) help_remove; exit 0;;
10251026
*)
@@ -1067,6 +1068,22 @@ remove() {
10671068

10681069
}
10691070

1071+
custom_remove() {
1072+
local name=$1
1073+
local path=${DEFAULT_FS_INSTALL_DIR}
1074+
1075+
root_fs_path=$path/$name
1076+
1077+
[[ -z $name ]] && EDIE "ERROR: distro name not specified"
1078+
[[ ! -d $root_fs_path ]] && EDIE "ERROR: distro ($name) not found or installed"
1079+
1080+
TITLE "> REMOVE custom-fs $name"
1081+
1082+
g_spin "pulse" \
1083+
"Removing $name" \
1084+
bash proot-utils/proot-uninstall-suite.sh "$root_fs_path"
1085+
}
1086+
10701087
_reset() {
10711088
if [[ -z $1 ]]; then
10721089
ELOG "reset(): no distro specified"

0 commit comments

Comments
 (0)