# Using space as separator was not working if the path contains spaces
# (I tried surrounding each path with "" or escaping each space with backslash, did not help)
# Rather than rewriting this part, I'll change to an IFS char that's unlikely to clash with any path specification. This way, spaces in paths should not need any changes.
IFS='>'# reset IFS
# asset is read into an array as tokens separated by IFS
# asset is read into an array as tokens separated by IFS
read -ra asset_array <<<"$asset"
read -ra asset_array <<<"$asset"
# sanity check for array length
# sanity check for array length
if[${#asset_array[@]} -gt 2];then
if[${#asset_array[@]} -gt 2];then
echo"<thesis> Cannot handle more than one space per line"
echo"<thesis> Cannot handle more than one $IFS character per line"
echo"<cheRTeX> Terminating..."
echo"<cheRTeX> Terminating..."
simpledelay.sh 2
simpledelay.sh 2
exit1
exit1
@ -190,14 +193,15 @@ if [ $# -eq 1 ]; then
if[ ! -f "$photoslastrun"];then
if[ ! -f "$photoslastrun"];then
# if, for some reason, the lastrun file does not exist
# if, for some reason, the lastrun file does not exist