dotwryn/zsh/google
2020-11-10 16:14:06 -07:00

20 lines
451 B
Bash

#!/bin/zsh
alias gdrive="RCLONE_GOOGLE_DRIVE_MOUNT"
RCLONE_GOOGLE_DRIVE_MOUNT() {
local RCLONE_REMOTE_NAME='google-drive';
local MOUNT_POINT="$HOME/GoogleDrive";
[ -d $MOUNT_POINT ] \
&& { echo "connection already active at '$MOUNT_POINT'"; return 1; }
clear;
figlet GOOGLE DRIVE CONNECTION | lolcat;
echo -e "\e[3m(C-c to close)\e[0m";
mkdir $MOUNT_POINT
rclone mount "$RCLONE_REMOTE_NAME:$1" "$HOME/GoogleDrive"
rmdir $MOUNT_POINT
}