Xcode:利用軟連接將 code snippets、斷點、templates 和主題備份到雲存儲中

#!/bin/bash

Backup_Path="$HOME/Library/Mobile Documents/com~apple~CloudDocs/Xcode"
Xcode_config_path="$HOME/Library/Developer/Xcode"

echo "Restoring code snippets..."
ln -s "$Backup_Path/UserData/CodeSnippets" "$Xcode_config_path/UserData"
echo "Restoring user breakpoints..."
ln -s "$Backup_Path/UserData/xcdebugger" "$Xcode_config_path/UserData"
echo "Restoring font and color themes..."
ln -s "$Backup_Path/UserData/FontAndColorThemes" "$Xcode_config_path/UserData"
echo "Restoring templates..."
ln -s "$Backup_Path/Templates" "$Xcode_config_path"
echo "All set!"

也能夠用 restore_xcode_configurationgit

修改 Backup_Path 和 Xcode_config_path 爲對應的路徑便可。github

相關文章
相關標籤/搜索