mirror of
https://github.com/danbee/mac-setup
synced 2025-03-04 08:39:10 +00:00
Use process substitution to run the script
This ensures that we can get input from the terminal.
This commit is contained in:
parent
a50d452c11
commit
a67e85a036
@ -7,5 +7,5 @@ Script and Brewfile to setup a Mac for development.
|
||||
1. Run the setup script with:
|
||||
|
||||
```sh
|
||||
curl -s https://raw.githubusercontent.com/danbee/mac-setup/master/setup.sh | sh`
|
||||
$ sh <( curl -s https://raw.githubusercontent.com/danbee/mac-setup/master/setup.sh )
|
||||
```
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
# Ask the user to generate a code signing key for `chunkwm`
|
||||
echo "Please generate a code signing certificate called 'chunkwm-cert' in Keychain Access"
|
||||
sh -c 'read -r -p "Press any key to continue... " -n 1'
|
||||
read -r -p "Press any key to continue... " -n 1
|
||||
|
||||
# We need to code sign chunkwm and skhd in order for them to be added to the
|
||||
# accessibility allowed list.
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd "$HOME"
|
||||
|
||||
if [ $SHELL != $(which zsh) ]; then
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
|
||||
# Close any open System Preferences panes, to prevent them from overriding
|
||||
# settings we’re about to change
|
||||
|
||||
3
setup.sh
3
setup.sh
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
MAC_SETUP_DIR="$HOME/mac-setup"
|
||||
|
||||
BOLD="\033[1m"
|
||||
@ -19,7 +20,7 @@ if [ ! -f "$HOME/.ssh/id_ed25519.pub" ]; then
|
||||
echo "============ Public key ============="
|
||||
cat ~/.ssh/id_ed25519.pub
|
||||
echo "====================================="
|
||||
sh -c 'read -r -p "Press any key to continue... " -n 1'
|
||||
read -r -p "Press any key to continue... " -n 1
|
||||
fi
|
||||
|
||||
# Add the SSH key to the agent now to avoid multiple prompts
|
||||
|
||||
Loading…
Reference in New Issue
Block a user