|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
#!/bin/bash cat > ~/tmp.command << 'EOF' #!/bin/bash export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH" rsync -avh --progress --delete "/Users/xxx/Library/CloudStorage/Dropbox/Obsidian/MyVault/" "/Users/xxx/Library/Mobile Documents/iCloud~md~obsidian/Documents/MyVault/" read -n 1 rm -f ~/tmp.command osascript -e 'tell application "Terminal" to close (every window whose name contains "tmp.command")' & EOF chmod +x ~/tmp.command open ~/tmp.command |