Add setup script
This commit is contained in:
parent
1880d22747
commit
e4b1fc02db
2 changed files with 43 additions and 9 deletions
16
README.md
16
README.md
|
@ -1,15 +1,13 @@
|
|||
# Getting started
|
||||
# Installation
|
||||
|
||||
1. Install [rcm](https://github.com/thoughtbot/rcm#installation):
|
||||
Install using:
|
||||
|
||||
```bash
|
||||
sudo add-apt-repository ppa:martin-frost/thoughtbot-rcm
|
||||
sudo apt-get update
|
||||
sudo apt-get install rcm
|
||||
cd $HOME && \
|
||||
git clone git@git.schauenburg.me:fernando/dotfiles.git .dotfiles && \
|
||||
.dotfiles/bin/setup.sh
|
||||
```
|
||||
|
||||
2. Install the dotfiles:
|
||||
Installation of the dotfiles is handled automatically from `setup.sh` via
|
||||
[rcm](https://github.com/thoughtbot/rcm#installation).
|
||||
|
||||
```bash
|
||||
env RCRC=$HOME/.dotfiles/rcrc rcup
|
||||
```
|
||||
|
|
36
bin/setup.sh
Executable file
36
bin/setup.sh
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Install RCM
|
||||
if ! command -v rcup >/dev/null 2>&1
|
||||
then
|
||||
case "$(uname -s)" in
|
||||
Linux*)
|
||||
sudo add-apt-repository -y ppa:martin-frost/thoughtbot-rcm && \
|
||||
apt-get update && \
|
||||
apt-get install -y rcm
|
||||
;;
|
||||
|
||||
Darwin*)
|
||||
brew tap thoughtbot/formulae
|
||||
brew install rcm
|
||||
;;
|
||||
|
||||
CYGWIN*)
|
||||
curl -LO https://thoughtbot.github.io/rcm/dist/rcm-1.3.1.tar.gz && \
|
||||
sha=$(sha256 rcm-1.3.1.tar.gz | cut -f1 -d' ') && \
|
||||
[ "$sha" = "9c8f92dba63ab9cb8a6b3d0ccf7ed8edf3f0fb388b044584d74778145fae7f8f" ] && \
|
||||
tar -xvf rcm-1.3.1.tar.gz && \
|
||||
cd rcm-1.3.1 && \
|
||||
./configure --prefix=/usr/local && make && sudo make install
|
||||
;;
|
||||
*)
|
||||
echo "Platform not supported"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Use RCM to install dotfiles
|
||||
env RCRC=$(realpath "${BASH_SOURCE%/*}/../rcrc") rcup -v
|
||||
|
Loading…
Add table
Reference in a new issue