mirror of
https://github.com/jakejarvis/dotfiles.git
synced 2025-04-26 03:45:21 -04:00
make the install script directly pipeable (don't do this)
This commit is contained in:
parent
10160f63c0
commit
f1e8bddb4a
11
README.md
11
README.md
@ -17,8 +17,15 @@ Thanks for visiting, the `exit` is that way!
|
|||||||
Designed for macOS, kinda works on Linux (requires [ZSH to be installed](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH#ubuntu-debian--derivatives-windows-10-wsl--native-linux-kernel-with-windows-10-build-1903) first):
|
Designed for macOS, kinda works on Linux (requires [ZSH to be installed](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH#ubuntu-debian--derivatives-windows-10-wsl--native-linux-kernel-with-windows-10-build-1903) first):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/jakejarvis/dotfiles.git ~/.dotfiles
|
git clone --recurse-submodules https://github.com/jakejarvis/dotfiles.git ~/.dotfiles
|
||||||
~/.dotfiles/install.sh
|
cd ~/.dotfiles
|
||||||
|
bash install.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
or:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -sL jrvs.io/bootstrap | bash # probably don't do this if you're not me
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
20
install.sh
20
install.sh
@ -1,16 +1,24 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# what a mess. https://stackoverflow.com/a/53183593
|
||||||
|
YOU_ARE_HERE="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||||
|
|
||||||
echo "👋 Deep breaths, everything will (probably) be fine!"
|
echo "👋 Deep breaths, everything will (probably) be fine!"
|
||||||
|
|
||||||
# Ask for the administrator password upfront
|
# Ask for the administrator password upfront
|
||||||
sudo -v
|
sudo -v
|
||||||
|
|
||||||
|
# Clone this repo if we haven't already
|
||||||
|
git clone --recurse-submodules https://github.com/jakejarvis/dotfiles.git "$YOU_ARE_HERE" || true
|
||||||
|
|
||||||
# Set up symbolic links for ZSH and Git pointing to this cloned repo
|
# Set up symbolic links for ZSH and Git pointing to this cloned repo
|
||||||
ln -sf ~/.dotfiles/zsh/.zshrc ~/.zshrc
|
ln -sf "$YOU_ARE_HERE/zsh/.zshrc" ~/.zshrc
|
||||||
ln -sf ~/.dotfiles/git/.gitconfig ~/.gitconfig
|
ln -sf "$YOU_ARE_HERE/git/.gitconfig" ~/.gitconfig
|
||||||
ln -sf ~/.dotfiles/git/.gitignore_global ~/.gitignore_global
|
ln -sf "$YOU_ARE_HERE/git/.gitignore_global" ~/.gitignore_global
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
ln -sf ~/.dotfiles/ssh/.ssh/config ~/.ssh/config
|
ln -sf "$YOU_ARE_HERE/ssh/.ssh/config" ~/.ssh/config
|
||||||
|
|
||||||
# Suppress terminal login banners
|
# Suppress terminal login banners
|
||||||
touch ~/.hushlogin
|
touch ~/.hushlogin
|
||||||
@ -28,8 +36,8 @@ fi
|
|||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
|
|
||||||
if [ "$(uname)" == "Darwin" ]; then
|
if [ "$(uname)" == "Darwin" ]; then
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1090,SC1091
|
||||||
source ./macos/macos.sh
|
source "$YOU_ARE_HERE/macos/macos.sh"
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "This isn't a Mac, so we're all done here!"
|
echo "This isn't a Mac, so we're all done here!"
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
# https://github.com/paulirish/dotfiles/blob/master/.osx
|
# https://github.com/paulirish/dotfiles/blob/master/.osx
|
||||||
# https://github.com/kevinSuttle/macOS-Defaults/blob/master/.macos
|
# https://github.com/kevinSuttle/macOS-Defaults/blob/master/.macos
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
# Change new hostname here if necessary
|
# Change new hostname here if necessary
|
||||||
COMPUTER_NAME="JJ-MBA"
|
COMPUTER_NAME="JJ-MBA"
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
# This shouldn't be run if not on macOS, but make double sure
|
# This shouldn't be run if not on macOS, but make double sure
|
||||||
if test ! "$(uname)" = "Darwin"; then
|
if test ! "$(uname)" = "Darwin"; then
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user