Skip to content

Instantly share code, notes, and snippets.

@SterlingButters
Created April 12, 2019 13:57
Show Gist options
  • Save SterlingButters/c9a12b6617977ca1334d3ec060297839 to your computer and use it in GitHub Desktop.
Save SterlingButters/c9a12b6617977ca1334d3ec060297839 to your computer and use it in GitHub Desktop.
Syncs oDrive files in the pwd (does not recurse into sub-dirs)
#!/bin/bash
for file in ./*; do
if [[ "$file" = *.cloud ]]; then
echo "File[$file] not synced"
/usr/bin/python /home/sterlingbutters/.odrive-agent/bin/odrive.py sync "$file"
elif [[ "$file" = *.cloudf ]]; then
echo "File[$file] not synced"
/usr/bin/python /home/sterlingbutters/.odrive-agent/bin/odrive.py sync "$file"
else
echo "Skipping File[$file]: (Already Synced)"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment