Guest User

sickbeard_postprocess.sh

a guest
Nov 22nd, 2012
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.49 KB | None | 0 0
  1. #!/bin/sh
  2. #Called after sickbeard processes an episode
  3.  
  4. SEED_DIR=~/Downloads/Seeding    #CHANGE THIS TO YOUR OWN LOCATION
  5. PROC_DIR=~/Downloads/Processing #CHANGE THIS TO YOUR OWN LOCATION
  6.  
  7. #args:
  8. # $1 = Final renamed filename with full path
  9. # $2 = Original filename with full path
  10.  
  11. PROC_DIR_LEN=${#PROC_DIR}
  12. ORIG_NAME=${2:$PROC_DIR_LEN+1} #substing of arg $2 from length of proc dir - this could be Season name/episode name.mkv
  13.  
  14. #create the link
  15. ln -fsn "$1" "$SEED_DIR/$ORIG_NAME"
Advertisement
Add Comment
Please, Sign In to add comment