Hey all,
I'm trying to set up a policy to a) move users home directory folders to Drive, then symlink so ~/Documents/ redirects to ~/Google Drive/Documents if ~/Google Drive/ exists, or b) Open /Applications/Google Drive.app if the folder doesn't exist
#!/bin/bash
# Get logged in user
loggedInUser=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'`
echo $loggedInUser
driveHome="$HOME/Google Drive/"
sudo chflags -R nouchg $HOME
echo $driveHome
#check of drive folder exists
#if yes, do all teh copying and linking
if [[ -d $driveHome ]] ; then
echo "Drive Exists"
else
#if no, then open the app
echo "Drive doesn't exist"
open /Applications/Google Drive.app
fi
I've removed all the folder work at the moment, because it keeps outputting "Drive doesnt exist" and opening the drive app
Are there any ideas/solutions for this?
Cheers
