Is someone willing to help me out? I've been using a similar script for google drive for sometime now. But with the release of backup and sync I can't seem to make this work.
1#!/bin/sh -x2logfile="/Library/Logs/jss.log"3user=`ls -l /dev/console | cut -d " " -f 4`4PRODUCT="Backup and Sync from Google"5# installation67 /bin/echo "`date`: Installing Backup and Sync for $user..." >> ${logfile} 8 dmgfile="image.dmg" 9 volname="Install Backup andy Sync for Google" 10 url="https://dl.google.com/drive/InstallBackupAndSync.dmg" 11 /bin/echo "`date`: Downloading $PRODUCT." >> ${logfile} 12 /usr/bin/curl -k -o /tmp/image.dmg $url 13 /bin/echo "`date`: Mounting installer disk image." >> ${logfile} 14 /usr/bin/hdiutil attach /tmp/image.dmg -nobrowse -quiet 15 /bin/echo "`date`: Installing..." >> ${logfile} 16 cp -R /Volumes/Install Backup and Sync from Google/Backup and Sync from Google.app /Applications/ 17 /bin/sleep 3 18 /bin/echo "`date`: Unmounting installer disk image." >> ${logfile} 19 /usr/bin/hdiutil detach $(/bin/df | /usr/bin/grep ${volname} | awk '{print $1}') -quiet 20 /bin/sleep 3 21 open -a /Applications/Google Backup and Sync from Google.app/
From the failure log it appears that it's downloading and mounting but the installation is failing because it can't find the file needed:
Installing...'<br/> cp -R '/Volumes/Install Backup and Sync from Google/Backup and Sync from Google.app' /Applications/<br/>cp: /Volumes/Install Backup and Sync from Google/Backup and Sync from Google.app: No such file or directory<br/> /bin/sleep 3<br/>+ date<br/> /bin/echo 'Wed Sep 27 10:41:24 PDT 2017: Unmounting installer disk image.'<br/>+ /bin/df<br/> /usr/bin/grep Install Backup andy Sync for Google<br/> awk '{print $1}'<br/>grep: Backup: No such file or directory<br/>grep: andy: No such file or directory<br/>grep: Sync: No such file or directory<br/>grep: for: No such file or directory<br/>grep: Google: No such file or directory<br/> /usr/bin/hdiutil detach -quiet<br/> /bin/sleep 3<br/> open -a '/Applications/Google Backup and Sync from Google.app/'<br/>FSPathMakeRef(/Applications/Google Backup and Sync from Google.app) failed with error -43.<br/>
Any help would be appreciated.