How to share/transfer an Atom installation (packages and settings) from one Mac to another?

前端 未结 6 1521
傲寒
傲寒 2020-12-04 07:14

Is it possible to copy Atom from one Mac to another, including all installed packages, settings etc?

6条回答
  •  没有蜡笔的小新
    2020-12-04 07:45

    You can sync your packages via package-list.txt file and a simple shell script.

    Create the package-list.txt file

    apm list --installed --bare > package-list.txt
    

    Install missing packages on another host

    BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
    INSTALLEd_PKGS=$(apm list --installed --bare)
    for PKG in $(cut -f1 -d@ $BASEDIR/package-list.txt); do
        grep -q $PKG <<< $INSTALLEd_PKGS || apm install $PKG
    done
    

提交回复
热议问题