fix installation process keep going on when tricky store is not installed
This commit is contained in:
KOWX712
2024-10-26 02:22:12 +08:00
parent 9f4f9f73aa
commit 35f07c5b1b
5 changed files with 28 additions and 10 deletions

View File

@@ -26,7 +26,7 @@ echo " Staring script..."
echo " "
# Create or overwrite the target.txt file
su -c > /data/adb/tricky_store/target.txt
> /data/adb/tricky_store/target.txt
echo " Adding apps to target.txt..."
echo " "

View File

@@ -3,7 +3,9 @@ echo "**********************************************"
echo "- Staring script..."
echo " "
sh "$MODDIR"/common/UpdateTargetList.sh || true
sh "$MODDIR"/common/UpdateTargetList.sh
echo "**********************************************"
echo "\(__All set!__)/"
echo "\(__All set!__)/"
echo "Exiting in 3 seconds..."
sleep 3

View File

@@ -10,14 +10,14 @@ MODDIR="/data/adb/tricky_store/target_list_config"
echo "- Checking config files..."
echo " "
if [ ! -f "$MODDIR/EXCLUDE" ]; then
echo "! Exclude list is missing!"
echo "! Exclude list is missing, please reinstall module"
exit 1
else
echo "- Exclude config file found."
echo " "
fi
if [ ! -f "$MODDIR/ADDITION" ]; then
echo "! Addition list is missing"
echo "! Addition list is missing, please reinstall module"
exit 1
else
echo "- Addition config file found."
@@ -31,7 +31,7 @@ ADDITIONS=$(grep -vE '^#|^$' "$MODDIR/ADDITION")
# Create or overwrite the target.txt file
echo "- Overwritting target.txt"
echo " "
su -c > /data/adb/tricky_store/target.txt
> /data/adb/tricky_store/target.txt
# Add all non-system apps to the target file and remove exclusions
echo "- Adding apps into /data/adb/tricky_store/target.txt"

View File

@@ -23,7 +23,7 @@ if [ -d /data/adb/modules/tricky_store ]; then
echo "- Tricky store module installed"
else
echo "! Tricky store module is not installed"
exit 1
abort " "
fi
key_check() {
@@ -62,9 +62,20 @@ if [ ! -d "$CONFIG_DIR" ]; then
mkdir -p "$CONFIG_DIR"
mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE"
mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION"
else
rm -f "$COMPATH/EXCLUDE"
rm -f "$COMPATH/ADDITION"
elif [ -d "$CONFIG_DIR" ]; then
if [ ! -f "$CONFIG_DIR/EXCLUDE"]; then
mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE"
rm -f "$COMPATH/ADDITION"
elif [ ! -f "$CONFIG_DIR/ADDITION"]; then
mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION"
rm -f "$COMPATH/EXCLUDE"
elif [ ! -f "$CONFIG_DIR/EXCLUDE" ] && [ ! -f "$CONFIG_DIR/ADDITION" ]; then
mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE"
mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION"
else
rm -f "$COMPATH/EXCLUDE"
rm -f "$COMPATH/ADDITION"
fi
fi
if [ ! -f "/data/adb/modules/$MODNAME/system.prop" ]; then

View File

@@ -2,6 +2,11 @@ MODDIR=${0%/*}
COMPATH="$MODDIR/common"
TS="/data/adb/modules/tricky_store"
if [ ! -f "$COMPATH/ninstalled" ] || [ ! -f "$COMPATH/disabled" ] || [ ! -f "$COMPATH/normal" ]; then
sed -i 's/^description=.*/description=Module is corrupted, please reinstall module./' "$MODDIR/module.prop"
abort
fi
if [ ! -d "$TS" ]; then
cat "$COMPATH/ninstalled" > "$MODDIR/module.prop"
elif [ -f "$TS/disable" ]; then