From 873e9156ba2594cb4fa9e9343b706078f6b42fd5 Mon Sep 17 00:00:00 2001 From: q3aql Date: Mon, 6 Nov 2023 20:07:07 +0100 Subject: [PATCH] Fix error messages on MacOS --- src/ks-av1s-folder | 4 +++- src/ks-mp3-album | 4 +++- src/ks-mp4s-folder | 4 +++- src/ks-oga-album | 4 +++- src/ks-upa | 7 +++++-- src/ks-upf | 7 +++++-- src/ks-upr | 7 +++++-- src/ks-upv | 7 +++++-- 8 files changed, 32 insertions(+), 12 deletions(-) diff --git a/src/ks-av1s-folder b/src/ks-av1s-folder index f0c4dd8..3a0f210 100755 --- a/src/ks-av1s-folder +++ b/src/ks-av1s-folder @@ -104,7 +104,9 @@ for format in ${formatFiles} ; do echo "null" > /dev/null else echo "+ Video file(s) in .${format} found!" - cd "${1}" && ls -1 *.${format} &>> ${tempFile} + cd "${1}" && ls -1 *.${format} &> /tmp/tempFile.txt + cat /tmp/tempFile.txt >> ${tempFile} + rm -rf /tmp/tempFile.txt 2> /dev/null fail=0 fi done diff --git a/src/ks-mp3-album b/src/ks-mp3-album index fda62b5..ea71e91 100755 --- a/src/ks-mp3-album +++ b/src/ks-mp3-album @@ -225,7 +225,9 @@ for format in ${formatFiles} ; do echo "null" > /dev/null else echo "+ Video file(s) in .${format} found!" - cd "${1}" && ls -1 *.${format} &>> ${tempFile} + cd "${1}" && ls -1 *.${format} &> /tmp/tempFile.txt + cat /tmp/tempFile.txt >> ${tempFile} + rm -rf /tmp/tempFile.txt 2> /dev/null fail=0 fi done diff --git a/src/ks-mp4s-folder b/src/ks-mp4s-folder index 2371390..c588642 100755 --- a/src/ks-mp4s-folder +++ b/src/ks-mp4s-folder @@ -104,7 +104,9 @@ for format in ${formatFiles} ; do echo "null" > /dev/null else echo "+ Video file(s) in .${format} found!" - cd "${1}" && ls -1 *.${format} &>> ${tempFile} + cd "${1}" && ls -1 *.${format} &> /tmp/tempFile.txt + cat /tmp/tempFile.txt >> ${tempFile} + rm -rf /tmp/tempFile.txt 2> /dev/null fail=0 fi done diff --git a/src/ks-oga-album b/src/ks-oga-album index 166a17a..64900c2 100755 --- a/src/ks-oga-album +++ b/src/ks-oga-album @@ -225,7 +225,9 @@ for format in ${formatFiles} ; do echo "null" > /dev/null else echo "+ Video file(s) in .${format} found!" - cd "${1}" && ls -1 *.${format} &>> ${tempFile} + cd "${1}" && ls -1 *.${format} &> /tmp/tempFile.txt + cat /tmp/tempFile.txt >> ${tempFile} + rm -rf /tmp/tempFile.txt 2> /dev/null fail=0 fi done diff --git a/src/ks-upa b/src/ks-upa index 03df081..5fe6beb 100755 --- a/src/ks-upa +++ b/src/ks-upa @@ -88,9 +88,12 @@ function listArchives() { if [ $? -ne 0 ] ; then echo "null" > /dev/null else - find "${1}"/*.${format} &>> ${dirTemp}/${listCompTemp} + find "${1}"/*.${format} &> ${dirTemp}/temp.tmp + cat ${dirTemp}/temp.tmp >> ${dirTemp}/${listCompTemp} echo "+ Audio file(s) in .${format} found!" - cd "${1}" && ls -1 *.${format} &>> ${dirTemp}/${listTemp} + cd "${1}" && ls -1 *.${format} &> ${dirTemp}/temp.tmp + cat ${dirTemp}/temp.tmp >> ${dirTemp}/${listTemp} + rm -rf ${dirTemp}/temp.tmp 2> /dev/null fail=0 fi done diff --git a/src/ks-upf b/src/ks-upf index bc3264c..cf8977f 100755 --- a/src/ks-upf +++ b/src/ks-upf @@ -115,9 +115,12 @@ function listArchives() { if [ $? -ne 0 ] ; then echo "null" > /dev/null else - find "${1}"/*.${format} &>> ${dirTemp}/${listCompTemp} + find "${1}"/*.${format} &> ${dirTemp}/temp.tmp + cat ${dirTemp}/temp.tmp >> ${dirTemp}/${listCompTemp} echo "+ File(s) in .${format} format found!" - cd "${1}" && ls -1 *.${format} &>> ${dirTemp}/${listTemp} + cd "${1}" && ls -1 *.${format} &> ${dirTemp}/temp.tmp + cat ${dirTemp}/temp.tmp >> ${dirTemp}/${listTemp} + rm -rf ${dirTemp}/temp.tmp 2> /dev/null fail=0 fi done diff --git a/src/ks-upr b/src/ks-upr index 1fb9a89..b274f18 100755 --- a/src/ks-upr +++ b/src/ks-upr @@ -105,9 +105,12 @@ function listArchives() { if [ $? -ne 0 ] ; then echo "null" > /dev/null else - find "${1}"/*.${format} &>> ${dirTemp}/${listCompTemp} + find "${1}"/*.${format} &> ${dirTemp}/temp.tmp + cat ${dirTemp}/temp.tmp >> ${dirTemp}/${listCompTemp} echo "+ File(s) in .${format} format found!" - cd "${1}" && ls -1 *.${format} &>> ${dirTemp}/${listTemp} + cd "${1}" && ls -1 *.${format} &> ${dirTemp}/temp.tmp + cat ${dirTemp}/temp.tmp >> ${dirTemp}/${listTemp} + rm -rf ${dirTemp}/temp.tmp 2> /dev/null fail=0 fi done diff --git a/src/ks-upv b/src/ks-upv index f78cb02..75fab5f 100755 --- a/src/ks-upv +++ b/src/ks-upv @@ -88,9 +88,12 @@ function listArchives() { if [ $? -ne 0 ] ; then echo "null" > /dev/null else - find "${1}"/*.${format} &>> ${dirTemp}/${listCompTemp} + find "${1}"/*.${format} &> ${dirTemp}/temp.tmp + cat ${dirTemp}/temp.tmp >> ${dirTemp}/${listCompTemp} echo "+ Video file(s) in .${format} found!" - cd "${1}" && ls -1 *.${format} &>> ${dirTemp}/${listTemp} + cd "${1}" && ls -1 *.${format} &> ${dirTemp}/temp.tmp + cat ${dirTemp}/temp.tmp >> ${dirTemp}/${listTemp} + rm -rf ${dirTemp}/temp.tmp 2> /dev/null fail=0 fi done