Skip to content

Instantly share code, notes, and snippets.

@otonielguajardo
Last active July 25, 2021 19:42
Show Gist options
  • Save otonielguajardo/f269e2b3db2d9305473d1e7dd3a57cb4 to your computer and use it in GitHub Desktop.
Save otonielguajardo/f269e2b3db2d9305473d1e7dd3a57cb4 to your computer and use it in GitHub Desktop.
Mount rclone OneDrive to ~/OneDrive on startup
#! /bin/bash
# Checks if rclone exists
if ! command -v rclone &> /dev/null
then
echo "install rclone first"
exit;
fi
# Checks if ~/OneDrive directory exists
if [ ! -d ~/OneDrive ];
then
echo "create ~/OneDrive directory first"
exit;
fi
# Mounts OneDrive to ~/OneDrive
rclone --vfs-cache-mode writes mount OneDrive: ~/OneDrive &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment