update.sh aktualisiert

This commit is contained in:
2025-04-29 15:38:49 +02:00
parent 5741dc387e
commit bf8b585f86

View File

@@ -1,63 +1,57 @@
#!/bin/bash #!/bin/bash
cd /var/www/html || exit 1 cd /var/www/html || exit 1
# Create array of app names for easier processing # First, let's clear the F-Droid index to force it to rebuild
apps=("YouTube" "Reddit" "SoundCloud" "Duolingo" "GoogleNews" "Instagram" "Twitter" "NovaLauncher" "Busuu" "Quizlet" "Telegram") rm -f repo/index*
rm -f repo/entry.jar
# Download sources # Remove old APKs and download new ones
sources=( rm -f ./repo/YouTube.apk
"https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/youtube-revanced-extended.apk" wget -O ./repo/YouTube.apk https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/youtube-revanced-extended.apk
"https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/reddit-revanced-extended.apk" touch -d "$(date +%Y-%m-%d)" ./repo/YouTube.apk
"https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/soundcloud-revanced.apk"
"https://git.felo.gg/FeloStore/Data/releases/download/latest/duolingo.apk"
"https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/googlenews-arm64-v8a-revanced.apk"
"https://git.felo.gg/FeloStore/Data/releases/download/latest/instagram.apk"
"https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/twitter-stable-piko.apk"
"https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/nova-launcher-indrastorms.apk"
"https://git.felo.gg/FeloStore/Data/releases/download/latest/busuu.apk"
"https://git.felo.gg/FeloStore/Data/releases/download/latest/quizlet.apk"
"https://git.felo.gg/FeloStore/Data/releases/download/latest/telegram.apk"
)
# Process each app rm -f ./repo/Reddit.apk
for i in "${!apps[@]}"; do wget -O ./repo/Reddit.apk https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/reddit-revanced-extended.apk
app="${apps[$i]}" touch -d "$(date +%Y-%m-%d)" ./repo/Reddit.apk
source="${sources[$i]}"
echo "Processing $app..." rm -f ./repo/SoundCloud.apk
wget -O ./repo/SoundCloud.apk https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/soundcloud-revanced.apk
touch -d "$(date +%Y-%m-%d)" ./repo/SoundCloud.apk
# Create temp directory for this app rm -f ./repo/Duolingo.apk
mkdir -p "./temp/$app" wget -O ./repo/Duolingo.apk https://git.felo.gg/FeloStore/Data/releases/download/latest/duolingo.apk
touch -d "$(date +%Y-%m-%d)" ./repo/Duolingo.apk
# Download to temp location first rm -f ./repo/GoogleNews.apk
wget -O "./temp/$app/${app}.apk" "$source" wget -O ./repo/GoogleNews.apk https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/googlenews-arm64-v8a-revanced.apk
touch -d "$(date +%Y-%m-%d)" ./repo/GoogleNews.apk
# Compare with existing file (if it exists) rm -f ./repo/Instagram.apk
if [ -f "./repo/${app}.apk" ]; then wget -O ./repo/Instagram.apk https://git.felo.gg/FeloStore/Data/releases/download/latest/instagram.apk
# Check if files are different touch -d "$(date +%Y-%m-%d)" ./repo/Instagram.apk
if ! cmp -s "./temp/$app/${app}.apk" "./repo/${app}.apk"; then
# Files are different - remove old file
rm -f "./repo/${app}.apk"
# Move new file into place
mv "./temp/$app/${app}.apk" "./repo/${app}.apk"
# Update the file's modification time to current time
touch "./repo/${app}.apk"
echo "$app updated with new version"
else
echo "$app is already up to date"
# Clean up temp file
rm -f "./temp/$app/${app}.apk"
fi
else
# File doesn't exist yet
mv "./temp/$app/${app}.apk" "./repo/${app}.apk"
touch "./repo/${app}.apk"
echo "$app added for the first time"
fi
done
# Clean up temp directory rm -f ./repo/Twitter.apk
rm -rf "./temp" wget -O ./repo/Twitter.apk https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/twitter-stable-piko.apk
touch -d "$(date +%Y-%m-%d)" ./repo/Twitter.apk
# Update the F-Droid repository rm -f ./repo/NovaLauncher.apk
fdroid update -c wget -O ./repo/NovaLauncher.apk https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/releases/download/all/nova-launcher-indrastorms.apk
touch -d "$(date +%Y-%m-%d)" ./repo/NovaLauncher.apk
rm -f ./repo/Busuu.apk
wget -O ./repo/Busuu.apk https://git.felo.gg/FeloStore/Data/releases/download/latest/busuu.apk
touch -d "$(date +%Y-%m-%d)" ./repo/Busuu.apk
rm -f ./repo/Quizlet.apk
wget -O ./repo/Quizlet.apk https://git.felo.gg/FeloStore/Data/releases/download/latest/quizlet.apk
touch -d "$(date +%Y-%m-%d)" ./repo/Quizlet.apk
rm -f ./repo/Telegram.apk
wget -O ./repo/Telegram.apk https://git.felo.gg/FeloStore/Data/releases/download/latest/telegram.apk
touch -d "$(date +%Y-%m-%d)" ./repo/Telegram.apk
# Remove the old metadata directory if it exists
rm -rf repo/metadata
# Now rebuild the index completely
fdroid update --create-metadata --clean