A series of utilities for setting up a Unix or Windows system automatically
You can use the quick-install method, by running the relevant command for your system.
If you want to customize the script for your needs, then follow configuration.
Run the following command from an admin-elevated powershell window*:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/chrisdmacrae/.config/main/install.ps1'))
* You can start an elevated powershell window by:
- Pressing
win
+r
- Typing in
powershell
- And holding
ctrl
+shift
and pressingenter
If you wish to install WSL(2), then you can run the following command from an admin-elevated powershell window:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/chrisdmacrae/.config/main/wsl2.ps1'))
Note: this script will restart your computer once or twice and resume. Wait until the script re-opens after a restart and prompts you to close it before trying to use WSL.
Once installed, follow the Unix instructions to configure the WSL distribution(s) you selected!
Run the following command from your operating system's shell/terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/chrisdmacrae/.config/main/install.sh)"
Each script follows a pretty similar convention. For basic configuration, edit everything above:
## Script Logic
## Only modify after this point if you know what you're doing!
The Windows scripts install applications, tools, and libraries using chocolatey, and will auto-install it if it is not present. You can learn how to use chocolatey for fine-grained control of your installations, including upgrading and uninstallation.
For Windows, download install.ps1
and edit the $APP_NAMES
variable list to add or remove new lines with the app identifier of the app you wish to support installing. You can use any app identifier from the chocolatey packages registry.
The Unix script uses homebrew to install apps and tools, and [asdf
] to install libraries. You can learn how to use homebrew for fine-grained control of your app and tool installations, including upgrading and uninstallation. You can learn how to use asdf
for fine-grained control of your libraries, including upgrading, supporting multiple versions of libraries on the same machine, and uninstallation.
For Unix, download install.sh
, then run the following command in the directory you downloaded it:
chmod 755 ./install.sh
Now, there are three variables you can edit:
APP_NAMES
These are GUI apps (think: IDE) that you can install. Edit the list to add or remove new lines with the app identifier of the app you wish to support installing.
You can use any identifier from the homebrew registry.
TOOL_NAMES
These are CLI apps (think: Github CLI) that you can install. Edit the list to add or remove new lines with the app identifier of the tools you wish to support installing.
You can use any identifier from the homebrew registry.
LIBRARIES
These are libraries and software development kits (think: NodeJS) that you can install. Edit the list to add or remove new lines with the library identifier of the tools you wish to support installing. The format for these is different than tools or app names.
library-name#download-url
:
library-name
is the name of theasdf
plugindownload-url
is the URL to download the plugin, separated from the library name with a#
.
Given you wanted to add support for NodeJS, you would go to the plugin installation instructions, and find a line that looks like:
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
You use nodejs
as library-name
and https://github.com/asdf-vm/asdf-nodejs.git
as the download URL
You can find a list of asdf libraries, which should include the install instructions, here.
- Note: do not add commas after each item in any of the lists