Skip to content

Commit 6d9bdf7

Browse files
authored
Remove long-deprecated convenience script
1 parent 10110db commit 6d9bdf7

File tree

5 files changed

+14
-195
lines changed

5 files changed

+14
-195
lines changed

convenience-scripts/README.md

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,3 @@
1-
# Convenience Scripts
2-
3-
These scripts allow you to quickly run the latest version of Open Android Backup without having to follow the usage instructions. Work in progress.
4-
5-
## get.openandroidbackup.me
6-
71
### Deprecated
82

9-
This convenience script has been deprecated and will stop functioning in April 2024. Please use the official usage instructions instead.
10-
11-
## Usage
12-
13-
You can access the convenience script from this domain. It automatically detects your operating system based on the user agent and serves the correct script.
14-
15-
### Linux or macOS
16-
17-
Run the following command in your terminal:
18-
19-
```bash
20-
curl -fsSL "https://get.openandroidbackup.me/" | bash
21-
```
22-
23-
### Windows
24-
25-
Run the following command in PowerShell:
26-
27-
```powershell
28-
irm "https://get.openandroidbackup.me/" | iex
29-
```
3+
This convenience script is deprecated. Please use the official usage instructions instead.

convenience-scripts/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<style>body { font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; background-color: #ebebeb; padding: 1em; }</style>
1010
</head>
1111
<body>
12-
<p>Warning: The Open Android Backup convenience script has been deprecated and will stop functioning in April 2024. Please use the official usage instructions instead. Read the GitHub repository's README for more information.</p>
13-
<p>This is meant to be downloaded and run from a terminal. See <a href="https://github.com/mrrfv/open-android-backup">here</a> for information about Open Android Backup.</p>
12+
<p>Please use the official usage instructions instead. Read the GitHub repository's README for more information.</p>
13+
<p>See <a href="https://github.com/mrrfv/open-android-backup">here</a> for information about Open Android Backup.</p>
1414
</body>
1515
</html>

convenience-scripts/invalid_ua.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
echo "Warning: This convenience script has been deprecated and will stop functioning in April 2024. Please use the official usage instructions instead. Read the GitHub repository's README for more information."
2-
echo "Could not detect your operating system based on your user agent. Please run this script in PowerShell on Windows or curl/wget on Linux or macOS, using the default UA."
1+
echo "Please use the official usage instructions instead. Read the GitHub repository's README for more information."
2+
3+
# Sleeping to ensure the user doesn't just ignore the warning
4+
sleep 5
5+
6+
exit 1

convenience-scripts/linux_mac.sh

Lines changed: 2 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,8 @@
11
#!/bin/bash
22

3-
echo "Warning: This convenience script has been deprecated and will stop functioning in April 2024. Please use the official usage instructions instead. Read the GitHub repository's README for more information."
3+
echo "Please use the official usage instructions instead. Read the GitHub repository's README for more information."
44

55
# Sleeping to ensure the user doesn't just ignore the warning
66
sleep 5
77

8-
echo "Detected operating system: Linux or macOS"
9-
echo "If you are running this script in WSL, please run it in Windows instead."
10-
echo "Sleeping for 5 seconds to allow you to cancel..."
11-
sleep 5
12-
13-
echo "Open Android Backup convenience script for Linux and macOS"
14-
echo "This script will install dependencies, download and run the latest release of Open Android Backup."
15-
echo "The script hasn't been fully tested, so feedback is welcome!"
16-
echo ""
17-
18-
warn_untested_os() {
19-
echo "WARNING: This convenience script has not been tested on your operating system. It may not work as expected."
20-
echo "If you encounter any issues, please report them at https://github.com/mrrfv/open-android-backup/issues"
21-
echo "Continuing in 10 seconds..."
22-
sleep 10
23-
}
24-
25-
# Detect OS
26-
if [[ -n "$WSL_DISTRO_NAME" ]]; then
27-
echo "Please run this script from Windows. Running it directly in WSL is unsupported."
28-
exit 1
29-
else
30-
echo "Not running in WSL, continuing..."
31-
fi
32-
33-
echo "Installing dependencies - you may be prompted for your password."
34-
if [[ "$OSTYPE" == "darwin"* ]]; then
35-
# macOS
36-
if which brew >/dev/null 2>&1; then
37-
echo "Homebrew is installed, continuing..."
38-
else
39-
echo "Homebrew is not installed. It is needed to continue. Press Enter to automatically install Homebrew."
40-
read -r # wait for enter key
41-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
42-
fi
43-
brew install --cask android-platform-tools
44-
brew install p7zip pv bash dialog curl wget unzip
45-
elif [[ -n "$(command -v apt)" ]]; then
46-
# Ubuntu and Debian
47-
sudo apt update && sudo apt install -y p7zip-full adb curl whiptail pv secure-delete wget unzip
48-
elif [[ -n "$(command -v pacman)" ]]; then
49-
# Arch Linux
50-
warn_untested_os
51-
sudo pacman -Syu --noconfirm p7zip curl wget pv bash whiptail adb secure-delete unzip
52-
elif [[ -n "$(command -v dnf)" ]]; then
53-
# Fedora
54-
warn_untested_os
55-
echo "You must first manually add the RPM Sphere and RPM Fusion repositories, see this link for instructions: https://rpmsphere.github.io/"
56-
echo "After adding the repos, press Enter to continue installing dependencies."
57-
read -r # wait for enter key
58-
sudo dnf install p7zip p7zip-plugins adb curl newt pv secure-delete
59-
elif [[ -n "$(command -v zypper)" ]]; then
60-
# openSUSE
61-
warn_untested_os
62-
sudo zypper refresh && sudo zypper install -y p7zip-full curl wget pv bash whiptail android-tools secure-delete unzip
63-
elif [[ -n "$(command -v emerge)" ]]; then
64-
# Gentoo Linux
65-
warn_untested_os
66-
sudo emerge --sync && sudo emerge --ask app-arch/p7zip dev-util/android-tools dev-util/curl net-misc/wget app-arch/unzip app-shells/bash app-misc/dialog app-misc/pv sys-apps/sec
67-
elif [[ -n "$(command -v yum)" ]]; then
68-
# RHEL/CentOS/Oracle Linux/etc.
69-
warn_untested_os
70-
sudo yum update && sudo yum install -y p7zip curl wget pv bash whiptail android-tools secure-delete unzip
71-
72-
else
73-
echo "Unsupported operating system. Follow the regular installation instructions instead."
74-
echo "If you encounter any issues, please report them at https://github.com/mrrfv/open-android-backup/issues"
75-
exit 1
76-
fi
77-
78-
echo "Downloading latest release of Open Android Backup..."
79-
# Download latest release of Open Android Backup and run it.
80-
OAB_DIRECTORY="open_android_backup_conveniencescript_$RANDOM"
81-
LATEST_RELEASE=$(curl --silent "https://api.github.com/repos/mrrfv/open-android-backup/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
82-
83-
mkdir -pv $OAB_DIRECTORY &&
84-
cd $OAB_DIRECTORY &&
85-
wget "https://github.com/mrrfv/open-android-backup/releases/download/$LATEST_RELEASE/Open_Android_Backup_${LATEST_RELEASE}_Bundle.zip" &&
86-
unzip "Open_Android_Backup_${LATEST_RELEASE}_Bundle.zip" &&
87-
chmod +x backup.sh &&
88-
echo "Running Open Android Backup..." &&
89-
bash ./backup.sh ;
90-
echo "Cleaning up..." &&
91-
cd .. &&
92-
rm -rf $OAB_DIRECTORY &&
93-
echo "Done!"
8+
exit 1

convenience-scripts/windows.ps1

Lines changed: 3 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,6 @@
1-
echo "Detected operating system: Windows"
2-
echo "Sleeping for 5 seconds to allow you to cancel..."
3-
sleep 5
1+
echo "Please use the official usage instructions instead. Read the GitHub repository's README for more information."
42

5-
# It makes more sense to put the deprecation warning after the OS detection, since the echo command is different in PowerShell.
6-
Write-Output "Warning: This convenience script has been deprecated and will stop functioning in April 2024. Please use the official usage instructions instead. Read the GitHub repository's README for more information."
3+
# Sleeping to ensure the user doesn't just ignore the warning
74
sleep 5
85

9-
Write-Output "Open Android Backup - Windows Convenience Script"
10-
Write-Output "This script lets you use open-android-backup on Windows."
11-
Write-Output "Please remember that this script hasn't been fully tested, and may contain bugs."
12-
13-
$distros = Get-ChildItem -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss" |
14-
ForEach-Object { Get-ItemProperty $_.PsPath } |
15-
Select-Object DistributionName, Version
16-
17-
if ($distros.Count -eq 0) {
18-
Write-Output "No WSL distros found. Please install a distro using 'wsl --install' and try again."
19-
exit
20-
}
21-
22-
$ubuntu = $distros | Where-Object { $_.DistributionName -eq "Ubuntu" }
23-
$debian = $distros | Where-Object { $_.DistributionName -eq "Debian" }
24-
25-
if ($null -ne $ubuntu) {
26-
if ($ubuntu.Version -eq 2) {
27-
Write-Output "Ubuntu is installed and running WSL 2. Using Ubuntu."
28-
$distro = "Ubuntu"
29-
} else {
30-
Write-Output "Ubuntu is installed but running WSL 1. Please convert it to WSL 2."
31-
exit
32-
}
33-
} elseif ($null -ne $debian) {
34-
if ($debian.Version -eq 2) {
35-
Write-Output "Debian is installed and running WSL 2. Using Debian."
36-
$distro = "Debian"
37-
} else {
38-
Write-Output "Debian is installed but running WSL 1. Please convert it to WSL 2."
39-
exit
40-
}
41-
} else {
42-
Write-Output "Neither Ubuntu nor Debian is installed. Please install one of these WSL distros and try again."
43-
exit
44-
}
45-
46-
pause
47-
Write-Output "Updating WSL..."
48-
wsl --update
49-
wsl --shutdown
50-
wsl -d $distro sudo apt update
51-
wsl -d $distro sudo apt dist-upgrade -y
52-
Write-Output "Installing dependencies and setting up environment..."
53-
wsl -d $distro sudo apt install p7zip-full secure-delete whiptail curl dos2unix pv zenity '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev -y
54-
Write-Output "Downloading latest release of Open Android Backup..."
55-
56-
$RANDOM = Get-Random -Minimum 1000 -Maximum 1000000
57-
$OAB_DIRECTORY="open_android_backup_conveniencescript_$($RANDOM)"
58-
$LATEST_RELEASE=(Invoke-WebRequest -Uri "https://api.github.com/repos/mrrfv/open-android-backup/releases/latest" -UseBasicParsing | ConvertFrom-Json).tag_name
59-
60-
New-Item -ItemType Directory -Path $OAB_DIRECTORY -Force | Out-Null
61-
Set-Location $OAB_DIRECTORY
62-
Invoke-WebRequest -Uri "https://github.com/mrrfv/open-android-backup/releases/download/$LATEST_RELEASE/Open_Android_Backup_${LATEST_RELEASE}_Bundle.zip" -OutFile "Open_Android_Backup_${LATEST_RELEASE}_Bundle.zip"
63-
Expand-Archive "Open_Android_Backup_${LATEST_RELEASE}_Bundle.zip" -DestinationPath .
64-
Write-Output "Converting files - this may take several minutes..."
65-
wsl -d $distro bash -c "sudo find ./ -name '*.sh' -type f -print0 | sudo xargs -0 dos2unix --"
66-
Write-Output "Running Open Android Backup..."
67-
wsl -d $distro ./windows-dependencies/env-startup.sh
68-
Write-Output "Cleaning up..."
69-
wsl --shutdown
70-
try {
71-
Stop-Process -Name adb.exe -Force | Out-Null
72-
Stop-Process -Name adb -Force | Out-Null
73-
} catch {
74-
Write-Output "adb not running."
75-
}
76-
Set-Location ..
77-
Remove-Item $OAB_DIRECTORY -Recurse -Force
78-
Write-Output "Done!"
79-
Write-Output "Exiting."
80-
pause
6+
exit 1

0 commit comments

Comments
 (0)