Last active
February 7, 2025 16:53
-
-
Save sadiqsalau/8644e414379b0a9eee8a35d527e966b4 to your computer and use it in GitHub Desktop.
Telegram Portable Updater and Backuper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# Directory Structure | |
# _BACKUP | |
# _BINARY | |
# _BASE | |
echo "Cleanup Previous Backup" | |
rm -rf _BACKUP telegram-accounts-backup.zip | |
echo "Setting Up Backup Directory" | |
mkdir _BACKUP | |
echo "Creating Backups..." | |
find . -mindepth 1 -maxdepth 1 -type d ! -name _BINARY ! -name _BASE ! -name _BACKUP \ | |
-exec cp --parents -t _BACKUP \ | |
{}/TelegramForcePortable/tdata/key_datas \ | |
{}/TelegramForcePortable/tdata/D877F783D5D3EF8Cs \ | |
{}/TelegramForcePortable/tdata/D877F783D5D3EF8C/maps \; | |
echo "Zipping Backup..." | |
zip -qr telegram-accounts-backup.zip \ | |
_BACKUP \ | |
_BASE \ | |
backup.sh \ | |
updater.sh; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# Directory Structure | |
# _BACKUP | |
# _BINARY | |
# _BASE | |
echo "Updating Telegram Binary..." | |
find . -mindepth 1 -maxdepth 1 -type d ! -name _BINARY ! -name _BASE ! -name _BACKUP \ | |
-exec rm -rf "{}/TelegramForcePortable/tupdates" \; \ | |
-exec rm -rf "{}/Telegram" \; \ | |
-exec ln _BINARY/Telegram -f -t {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment