Skip to content

Commit ca87922

Browse files
committed
add: install.sh
1 parent 2711eab commit ca87922

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
# dotfiles
1+
# dotfiles
2+
3+
## Installation
4+
```
5+
$ curl -sL https://github.com/dev-satoshi/dotfiles/install.sh | sh
6+
```

install.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
set -euo pipefail
3+
4+
INSTALL_DIR="$HOME/dotfiles"
5+
6+
if [ -d "$INSTALL_DIR" ]; then
7+
echo "Updating dotfiles..."
8+
git -C "$INSTALL_DIR" pull
9+
else
10+
echo "Installing dotfiles..."
11+
git clone https://github.com/dev-satoshi/dotfiles "$INSTALL_DIR"
12+
fi
13+
14+
sh "$INSTALL_DIR/scripts/setup.sh"

0 commit comments

Comments
 (0)