#! /bin/bash
# IF torrent contains music (torrent folder is in /mnt/music) then
#copy it to the afp share /mnt/newmusic
parentdir="$(dirname "$TR_TORRENT_DIR")"
if [ $parentdir="/mnt/music/" ]
then
cp $TR_TORRENT_DIR /mnt/newmusic
fi
This script isn't working, it's my first ever bash script I've written but I think it's pretty simple and should work.. any one able to see any glaring errors?
permissions on the script are 777
Thank you
# IF torrent contains music (torrent folder is in /mnt/music) then
#copy it to the afp share /mnt/newmusic
parentdir="$(dirname "$TR_TORRENT_DIR")"
if [ $parentdir="/mnt/music/" ]
then
cp $TR_TORRENT_DIR /mnt/newmusic
fi
This script isn't working, it's my first ever bash script I've written but I think it's pretty simple and should work.. any one able to see any glaring errors?
permissions on the script are 777
Thank you