aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-04-29 22:18:38 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-04-29 22:18:38 -0300
commitd580f01e9b0f37466473519206d86355a312e133 (patch)
treebefd2ba64614803d3215efd251c7f53e379f53a3
parent85523e7aa67e0c50cc0e66f81ced720aeaa7b167 (diff)
downloadscripts-d580f01e9b0f37466473519206d86355a312e133.tar.gz
scripts-d580f01e9b0f37466473519206d86355a312e133.tar.bz2
Fix: copy-item-to-kobo: check if item has unspported chars in it's file name
-rwxr-xr-xcopy-item-to-kobo7
1 files changed, 7 insertions, 0 deletions
diff --git a/copy-item-to-kobo b/copy-item-to-kobo
index 0650a52..aa751fb 100755
--- a/copy-item-to-kobo
+++ b/copy-item-to-kobo
@@ -33,6 +33,13 @@ fi
show --search "$PATTERN" | while read item; do
dirname="`dirname "$item"`"
+ # Check if item has unspported chars in it's file name
+ if echo "$item" | grep -q ':'; then
+ echo "$BASENAME: unsupported character ':' in file name '$item'"
+ echo "$BASENAME: please rename the file and try again"
+ exit 1
+ fi
+
echo "Copying $item..."
silentSsh $REMOTE <<EOC