Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add warning to readme about running code from strangers #59

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,31 @@ This repository contains my personal dotfiles, as well as several scripts to ins

Here's a short description of each script in this repository:

- `local.sh` _interactively_ configure local settings unique to each machine, like the computer name and your git user details
- `bootstrap.sh` bootstrap install everything, including cloning this repository
- `run.sh` install Homebrew and run all the following scripts
- `dotsync.sh` sync and symlink dotfiles from this repository to your home directory
- `macos.sh` configure several macOS settings
- `install.sh` install fonts, tools, and apps using Homebrew, [`uv`](https://docs.astral.sh/uv/), and the Mac App Store
- `dock.sh` configure macOS dock
- `bootstrap.sh` bootstrap install everything, including cloning this repository
- `run.sh` install Homebrew and run all scripts
- `local.sh` final local settings, like configuring git user details and registering apps using keys stored in 1Password
- `bash_traceback.sh` helper script used by other scripts to print a more helpful traceback on failure (does nothing by itself)

All these scripts are idempotent, meaning they can be run multiple times without issue.

**Attention:** Running these dotfiles blindly will overwrite settings and install apps and fonts that you probably don't need. Use at your own risk!
**Warning:** Running these dotfiles blindly will overwrite settings and install apps and fonts that you probably don't need. Use at your own risk!

## Installation

On a fresh (or not so fresh) macOS install, run the following command to install Homebrew and run all scripts:

```bash
curl -L https://raw.githubusercontent.com/martimlobao/dotfiles/main/bootstrap.sh | bash -s
```

For my own convenience, I have a shorter `http://dot.lobao.io` URL that redirects to the same script. However, you probably shouldn't run arbitrary code from a stranger on the internet, so unless you're me or you fully trust me, it might be best to use the longer version.
martimlobao marked this conversation as resolved.
Show resolved Hide resolved

The easier-to-remember command is:

```bash
bash <(curl -L dot.lobao.io)
```
Expand Down
4 changes: 4 additions & 0 deletions linkme/.functions
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ function syncapps() {
bash "${DOTPATH}/install.sh"
}

function bootstrap() {
bash "${DOTPATH}/bootstrap.sh" -y
}

# Start screensaver.
function ss() {
open -a ScreenSaverEngine
Expand Down