Sublime Forum

Automatic Setup of Packages

#1

I am trying to get a bash script setup to install for new machines and when I wipe my computer. One problem I am hitting is that when I bring in the Package Control.sublime-settings after installing PC, I need to open Sublime for it to being the process of putting packages in. However the next line in my script copies in my settings, so because the settings have a theme set, ST cannot find it and changes to default theme in settings, thus busting my settings lol.

Is there a way to maybe call Package Control from command line to start its install process then I can copy settings over?

Does this make any sense? :slight_smile:

Thank you!

0 Likes

#2

Sounds like you could just copy PC’s settings file first, then launch ST to have PC download the packages, and then copy the rest of your User folder (notably preferences).

2 Likes

#3

Yes indeed, however, trying to find a way to automate it from a script so I do not have to manually do any steps.

Not a big deal obviously, would just be cool :slight_smile:

0 Likes

#4

Do you want to automate everything without opening Sublime Text, like sh automate.sh and when this script finishes and everything is setup?

0 Likes

#5

As a Sublime package, I don’t think there’s any easy way to make Package Control do anything in the general case. You could possibly pull related code out into a separate Python file and run that to try and approximate what it would do, but that seems like a lot of work. Among other things you would have to replicate parts of the Sublime environment, like the sublime module so that it could figure out where packages are supposed to go, the platform, and so on.

If I was in your shoes I would modify the script to also pull down the theme that you use in the same way that it’s pulling Package Control and put them both in place at the same time. Then when you start Sublime for the first time, Package Control will back fill all of the missing packages and Sublime will find the theme and not get mad.

1 Like

#6

I did some automatic setup by Sublime Text package. It works like this, you install the package and the package install all the other packages it was configured to install: Channel Manager

1 Like

#7

Thanks I’ll check into that option also

0 Likes