Files
backup_script/tools/script/Get_DirName
2021-12-30 17:53:53 +08:00

20 lines
666 B
Bash

#!/system/bin/sh
MODDIR="${0%/*}"
tools_path="$MODDIR/tools"
bin_path="$MODDIR/tools/bin"
[[ ! -d $tools_path ]] && echo "$tools_path目錄遺失" && exit 1
[[ ! -d $bin_path ]] && echo "$bin_path目錄遺失" && exit 1
txt="$MODDIR/appList.txt"
txt="${txt/'/storage/emulated/'/'/data/media/'}"
. "$bin_path/bin.sh"
echo "#不需要恢復還原的應用請在開頭注釋# 比如#xxxxxxxx 酷安">"$txt"
find "$MODDIR" -maxdepth 1 -type d | sort | while read; do
if [[ -f $REPLY/app_details ]]; then
unset PackageName
. "$REPLY/app_details"
if [[ $PackageName != "" ]]; then
echo "${REPLY##*/} $PackageName">>"$txt"
fi
fi
done
echoRgb "$txt重新生成"