diff --git a/bashrc.sh b/bashrc.sh index facaeed..3fdd919 100755 --- a/bashrc.sh +++ b/bashrc.sh @@ -390,22 +390,24 @@ function pull-plex { dest=/sdcard/Movies/ fi + echo "`date` - Copying files from '$plex_dir' to '$dest'." su -c "cp -Rv '$plex_dir'/{1,2}/* '$dest'" + echo -e "\n`date` - Combining videos split into chunks." cd "$dest" ls | while read dir; do - echo "Checking '$dir'" + echo -e "\n Checking '$dir'" cd "$dir" ls -lh # Unsure why -e and -f don't work here. Spaces in filenames? Globs? if [[ `ls *.chunk0 2>/dev/null` ]]; then - final="movie.mkv" - echo "Catting files together to make '$final'." + final="$dir.mkv" + echo -e "\n Catting files together to make '$final'." - cat *.chunk* > $final - ls -lh $final + cat *.chunk* > "$final" + ls -lh "$final" - rm -v *.chunk* + mv -v *.chunk* ~/TRASH/ fi cd .. done