LoginSignup
1
1

More than 5 years have passed since last update.

mackup でdotfilesを管理

Last updated at Posted at 2016-06-12

手軽に、、時間かかったしミスった

いろいろ調べたけど複雑なのは心配だったのでこれにした。
結果、、良かったのだけれど、途中ミスっていろいろファイルが消失。
mackup backupをしたら、容易に削除しないようにしませう。
消すならバックップは必要かと。
理解していなかったのはbackup時点でシンボリックリンクに差し代わることでした。。orz
storageの設定によるとは思うけど。

Mac 環境構築の自動化 2015年末版 ( homebrew + homebrew-cask + homebrew-brewdle + mackup + crontab + mas-cli ) - Qiita
http://qiita.com/ctokoro/items/d564248eeaebbf003edc

mackup/README.md at master · lra/mackup
https://github.com/lra/mackup/blob/master/doc/README.md#add-support-for-an-application-or-any-file-or-directory

mackup/.mackup.cfg at master · lra/mackup
https://github.com/lra/mackup/blob/master/doc/.mackup.cfg

File Finder
https://github.com/lra/mackup/find/master

dotfiles, Atomの設定をMackupで管理する - Qiita
http://qiita.com/saboyutaka/items/b4aaa1f5fcd0ea148b2a

復旧の際のログの一部

find . -type l -ls|grep dotfile
rm -rf "$HOME/Library/Preferences/PhpStorm2016.1"
rm -rf "$HOME/Library/Caches/PhpStorm2016.1"
rm -rf "$HOME/Library/Application Support/PhpStorm2016.1"
rm -rf "$HOME/Library/Logs/PhpStorm2016.1"

運用

command

mackup backup -f # yes|hoge がいいのかしら?
mackup uninstall -f
git commmit

tree

.mackup
├── alfread.cfg #シンボリックリンクにしたらダメだったので無効
├── kobito.cfg #シンボリックリンクにしたらダメだったので無効
└── mackup_script.cfg #同期用のスニペットなど
.mackup.cfg [error opening dir]
.mackup_script #同期用のスニペットなど
├── mackup_backup_commit.sh
└── mackup_unison.sh # unisonコマンドはel-capitanでダメだったのでrsyncに差し替え

課題

OSの違いとかを踏まえて必要な分だけ同期させるようなこと。。
いまのところはほぼバックアップ的な用途。

なんかエラーが出てうまく動かない。。

pipインストールしてコードを書き換えて対応
pip3でやった

In /usr/local/lib/python2.7/dist-packages/backports/configparser/init.py, I changed this line optname = self.optionxform(optname.rstrip()) to optname = self.optionxform(optname.encode('utf-8').rstrip()) and the problem is solved.
fmartingr referenced this issue on 4 Nov 2016
Open
Fix string conversion error on python 3 #909
@ooystein

I solved this by removing the utf-8 decoding of the path in mackup/config.py

224: else:
225: path = path.decode("utf-8")

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1