Skip to content

Commit

Permalink
Add documentation for convenience script
Browse files Browse the repository at this point in the history
  • Loading branch information
mrrfv committed May 14, 2023
1 parent 586eace commit 6bed2f5
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 5 deletions.
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ These things are the majority of what most people would want to keep safe, but e
- Backups are encrypted along with their metadata.
- Optionally securely erases all unencrypted temporary files created by the script.
- All data is compressed using 7-Zip with maximum compression settings.

## Installation

### Linux
Expand Down Expand Up @@ -71,7 +70,6 @@ brew install p7zip pv bash dialog
3. Open the repository in the file explorer. Right click on a file called `backup-windows.ps1`, and click on "Run with PowerShell". **IMPORTANT: If you see an error after running the script, search for "Developer Settings" in the Settings app, and apply the settings related to PowerShell.**

![Powershell Developer Settings](.github/images/windows-powershell-developer-settings.png)

## Usage

Just run `backup.sh` and the script will walk you through the process. This section covers advanced usage of this program.
Expand Down Expand Up @@ -137,6 +135,30 @@ $ unattended_mode="yes" selected_action="Backup" mode="Wired" export_method="tar
$ archive_password="456" ./backup.sh
```

## Convenience Script

If you'd like to quickly run the latest version of Open Android Backup without having to follow the usage instructions, you can use the convenience script. It's a **work in progress**, but it should work on most systems.

Please note that there are **security risks** associated with running scripts from the internet. It's recommended that you review the script before running it. If you don't trust me or Cloudflare, you can always download the script and run it manually.

### Linux or macOS

Run the following command in your terminal:

```bash
curl -fsSL get.openandroidbackup.me | bash
```

### Windows

Run the following command in PowerShell:

```powershell
irm https://get.openandroidbackup.me/ | iex
```

The same path is used because the server automatically detects your operating system based on the user agent and serves the correct script.

## Building companion app

**Note:** You don't need to do this, as the precompiled companion app is automatically downloaded at runtime from GitHub Releases.
Expand Down
20 changes: 20 additions & 0 deletions convenience-scripts/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# Convenience Scripts

These scripts allow you to quickly run the latest version of Open Android Backup without having to follow the usage instructions. Work in progress.

## get.openandroidbackup.me

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.

### Linux or macOS

Run the following command in your terminal:

```bash
curl -fsSL "https://get.openandroidbackup.me/" | bash
```

### Windows

Run the following command in PowerShell:

```powershell
irm "https://get.openandroidbackup.me/" | iex
```
2 changes: 1 addition & 1 deletion convenience-scripts/linux_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ warn_untested_os() {

# Detect OS
if [[ -n "$WSL_DISTRO_NAME" ]]; then
echo "WSL is not supported by the convenience script at this time. Please follow the regular usage instructions at https://github.com/mrrfv/open-android-backup"
echo "Please run this script from Windows. Running it directly in WSL is unsupported."
exit 1
else
echo "Not running within WSL, continuing..."
Expand Down
8 changes: 6 additions & 2 deletions convenience-scripts/windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ Write-Output "Running Open Android Backup..."
wsl -d $distro ./windows-dependencies/env-startup.sh
Write-Output "Cleaning up..."
wsl --shutdown
Stop-Process -Name adb.exe -Force | Out-Null
Stop-Process -Name adb -Force | Out-Null
try {
Stop-Process -Name adb.exe -Force | Out-Null
Stop-Process -Name adb -Force | Out-Null
} catch {
Write-Output "adb not running."
}
Set-Location ..
Remove-Item $OAB_DIRECTORY -Recurse -Force
Write-Output "Done!"
Expand Down

0 comments on commit 6bed2f5

Please sign in to comment.