OSX-Migrater.sh 604 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. # A qTox profile migrater for OSX
  3. now=$(date +"%m_%d_%Y-%H.%M.%S")
  4. bak="~/.Tox-Backup-$now"
  5. echo "Figuring out if action is required ..."
  6. if [ -d ~/Library/Preferences/tox ]; then
  7. echo "Moving profile(s) ..."
  8. cp -r ~/Library/Preferences/tox ~/Library/Application\ Support/
  9. mv ~/Library/Application\ Support/tox/ ~/Library/Application\ Support/Tox
  10. mv ~/Library/Preferences/tox ~/.Tox-Backup-$now
  11. echo "Done! You profile(s) have been moved! A back up coppy still exists at:"
  12. echo "$bak"
  13. else
  14. echo "Cannot locate old profile directory, profile migration not performed"
  15. fi
  16. exit 0