Skip to content

Instantly share code, notes, and snippets.

@ashleyconnor
Created May 15, 2022 01:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashleyconnor/a7ceba68a4685d4ebaa7072099f50123 to your computer and use it in GitHub Desktop.
Save ashleyconnor/a7ceba68a4685d4ebaa7072099f50123 to your computer and use it in GitHub Desktop.
Tranmission script to automatically unrar downloads if required
#!/bin/bash
#A simple script to extract a rar file inside a directory downloaded by Transmission.
#It uses environment variables passed by the transmission client to find and extract any rar files from a downloaded torrent into the folder they were found in.
find /"$TR_TORRENT_DIR"/"$TR_TORRENT_NAME" -name "*.rar" -execdir docker run --rm -v "$PWD":/files maxcnunes/unrar:latest unrar e -o- -r "{}" \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment