#!/bin/bash cd /var/www/html || exit 1 # Create array of app names for easier processing apps=("YouTube" "Reddit" "SoundCloud" "Duolingo" "GoogleNews" "Instagram" "Twitter" "NovaLauncher" "Busuu" "Quizlet" "Telegram") # Download sources sources=( "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" "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 for i in "${!apps[@]}"; do app="${apps[$i]}" source="${sources[$i]}" echo "Processing $app..." # Create temp directory for this app mkdir -p "./temp/$app" # Download to temp location first wget -O "./temp/$app/${app}.apk" "$source" # Compare with existing file (if it exists) if [ -f "./repo/${app}.apk" ]; then # Check if files are different 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 -rf "./temp" # Update the F-Droid repository fdroid update -c