diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2014-12-08 19:25:44 +0900 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2014-12-08 19:25:44 +0900 |
commit | edfaea1e6cd01129275232a46026cd4183ccdfc4 (patch) | |
tree | 38888f1f16bc52f00300c079f8af48fe25a3d221 /bin/kindlenotes | |
parent | 5bf5a4d5b3c44316846368cd8abdfd4d02a1d473 (diff) | |
download | dotfiles-edfaea1e6cd01129275232a46026cd4183ccdfc4.tar.gz |
better error reporting for kindlenotes script
Diffstat (limited to 'bin/kindlenotes')
-rwxr-xr-x | bin/kindlenotes | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/kindlenotes b/bin/kindlenotes index 3a6ce5e9..4a498ff5 100755 --- a/bin/kindlenotes +++ b/bin/kindlenotes @@ -13,13 +13,15 @@ sudo umount $kindle sudo mount $kindle $MNT if [ -e "$DEST/$filename" ]; then - echo >&2 Won\'t clobber other Kindle notes + echo >&2 ERROR: Won\'t clobber other Kindle notes elif sudo mv --no-clobber \ "$MNT/documents/My Clippings.txt" \ "$DEST/$filename"; then sudo chown "$USER:$group" "$DEST/$filename" # remove the supporting file only if the clippings were moved successfully sudo rm -rf "$MNT/documents/My Clippings.sdr" +else + echo >&2 ERROR: Couldn\'t move the clippings file fi sudo umount $kindle |