From b75802b8f4d1363eac4ad70e6f67fc1e154ee7d3 Mon Sep 17 00:00:00 2001 From: josh Date: Wed, 6 Sep 2017 15:40:46 -0600 Subject: [PATCH] Add 'sermon-upload.sh' --- sermon-upload.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sermon-upload.sh diff --git a/sermon-upload.sh b/sermon-upload.sh new file mode 100644 index 0000000..bde21c0 --- /dev/null +++ b/sermon-upload.sh @@ -0,0 +1,16 @@ +cd 2017 +sermons=$(ls /mnt/52265C99265C8041/Users/Berean-Sound/sermons) +IFS=$'\n' +lastsermon=$(echo "${sermons[*]}" | sort -nr | head -n1) +cp /mnt/52265C99265C8041/Users/Berean-Sound/sermons/$lastsermon . + +rsync --update --progress -e "ssh -i /home/berean/sermons/.tempssh/temp" *.mp3 sermons@bereanbibleutah.org:/home/josh/sermons/2017/ + +sermons=$(ssh -i /home/berean/sermons/.tempssh/temp sermons@bereanbibleutah.org 'ls /home/josh/sermons/2017') +IFS=$'\n' +recentsermon=$(echo "${sermons[*]}" | sort -nr | head -n1) +echo $recentsermon + +#cd .. +#cd 2016 +#rsync --progress -e "ssh -i ../.tempssh/temp" *.mp3 sermons@bereanbibleutah.org:/home/josh/sermons/2016/ \ No newline at end of file