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 " " echo " "
# Create or overwrite the target.txt file # 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 " Adding apps to target.txt..."
echo " " echo " "

View File

@@ -3,7 +3,9 @@ echo "**********************************************"
echo "- Staring script..." echo "- Staring script..."
echo " " echo " "
sh "$MODDIR"/common/UpdateTargetList.sh || true sh "$MODDIR"/common/UpdateTargetList.sh
echo "**********************************************" 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 "- Checking config files..."
echo " " echo " "
if [ ! -f "$MODDIR/EXCLUDE" ]; then if [ ! -f "$MODDIR/EXCLUDE" ]; then
echo "! Exclude list is missing!" echo "! Exclude list is missing, please reinstall module"
exit 1 exit 1
else else
echo "- Exclude config file found." echo "- Exclude config file found."
echo " " echo " "
fi fi
if [ ! -f "$MODDIR/ADDITION" ]; then if [ ! -f "$MODDIR/ADDITION" ]; then
echo "! Addition list is missing" echo "! Addition list is missing, please reinstall module"
exit 1 exit 1
else else
echo "- Addition config file found." echo "- Addition config file found."
@@ -31,7 +31,7 @@ ADDITIONS=$(grep -vE '^#|^$' "$MODDIR/ADDITION")
# Create or overwrite the target.txt file # Create or overwrite the target.txt file
echo "- Overwritting target.txt" echo "- Overwritting target.txt"
echo " " 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 # Add all non-system apps to the target file and remove exclusions
echo "- Adding apps into /data/adb/tricky_store/target.txt" 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" echo "- Tricky store module installed"
else else
echo "! Tricky store module is not installed" echo "! Tricky store module is not installed"
exit 1 abort " "
fi fi
key_check() { key_check() {
@@ -62,9 +62,20 @@ if [ ! -d "$CONFIG_DIR" ]; then
mkdir -p "$CONFIG_DIR" mkdir -p "$CONFIG_DIR"
mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE" mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE"
mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION" mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION"
else elif [ -d "$CONFIG_DIR" ]; then
rm -f "$COMPATH/EXCLUDE" if [ ! -f "$CONFIG_DIR/EXCLUDE"]; then
rm -f "$COMPATH/ADDITION" 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 fi
if [ ! -f "/data/adb/modules/$MODNAME/system.prop" ]; then if [ ! -f "/data/adb/modules/$MODNAME/system.prop" ]; then

View File

@@ -2,6 +2,11 @@ MODDIR=${0%/*}
COMPATH="$MODDIR/common" COMPATH="$MODDIR/common"
TS="/data/adb/modules/tricky_store" 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 if [ ! -d "$TS" ]; then
cat "$COMPATH/ninstalled" > "$MODDIR/module.prop" cat "$COMPATH/ninstalled" > "$MODDIR/module.prop"
elif [ -f "$TS/disable" ]; then elif [ -f "$TS/disable" ]; then