mirror of
https://github.com/balkian/dotfiles.git
synced 2024-12-03 16:52:29 +00:00
Makefile!
This commit is contained in:
parent
37837558b1
commit
0c3fc88325
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
vim/Session.vim
|
|
@ -1,22 +1,25 @@
|
|||||||
FROM ubuntu:16.04
|
FROM ubuntu:16.04
|
||||||
|
|
||||||
RUN apt-get update -y
|
RUN apt-get update -y && \
|
||||||
RUN apt-get install -y build-essential
|
apt-get install -y build-essential \
|
||||||
RUN apt-get install -y cmake
|
cmake \
|
||||||
RUN apt-get install -y curl
|
curl \
|
||||||
RUN apt-get install -y diffstat
|
diffstat \
|
||||||
RUN apt-get install -y git
|
git \
|
||||||
RUN apt-get install -y pkg-config
|
pkg-config \
|
||||||
RUN apt-get install -y python
|
python \
|
||||||
RUN apt-get install -y python-dev
|
python-dev \
|
||||||
RUN apt-get install -y python3
|
python \
|
||||||
RUN apt-get install -y tmux
|
python3 \
|
||||||
RUN apt-get install -y vim
|
tmux \
|
||||||
RUN apt-get install -y zsh
|
stow \
|
||||||
|
sudo \
|
||||||
|
vim \
|
||||||
|
zsh && \
|
||||||
|
apt clean
|
||||||
|
|
||||||
RUN curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python2
|
RUN curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python3
|
||||||
RUN pip install virtualenv
|
RUN pip install virtualenv virtualenvwrapper
|
||||||
RUN pip install virtualenvwrapper
|
|
||||||
|
|
||||||
# Setup home environment
|
# Setup home environment
|
||||||
RUN useradd dev
|
RUN useradd dev
|
||||||
@ -38,17 +41,15 @@ VOLUME /usr/src/app
|
|||||||
|
|
||||||
WORKDIR /home/dev
|
WORKDIR /home/dev
|
||||||
ENV HOME /home/dev
|
ENV HOME /home/dev
|
||||||
RUN git clone https://github.com/balkian/dotfiles /home/dev/dotfiles
|
RUN mkdir /home/dev/dotfiles/
|
||||||
|
RUN ls /home/dev/dotfiles
|
||||||
|
COPY . /home/dev/dotfiles
|
||||||
RUN sh /home/dev/dotfiles/make.sh
|
RUN sh /home/dev/dotfiles/make.sh
|
||||||
|
|
||||||
# Link in shared parts of the home directory
|
# Link in shared parts of the home directory
|
||||||
RUN ln -s /var/shared/.ssh
|
RUN ln -s /var/shared/.ssh && ln -s /usr/src/app
|
||||||
RUN ln -s /usr/src/app
|
|
||||||
RUN chsh dev -s /usr/bin/zsh
|
RUN chsh dev -s /usr/bin/zsh
|
||||||
|
|
||||||
RUN chown -R dev: /home/dev
|
|
||||||
RUN chown -R dev: /usr/local/
|
|
||||||
|
|
||||||
RUN echo "dev ALL = NOPASSWD: ALL" >> /etc/sudoers
|
RUN echo "dev ALL = NOPASSWD: ALL" >> /etc/sudoers
|
||||||
|
|
||||||
USER dev
|
USER dev
|
15
Makefile
Normal file
15
Makefile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
########## Variables
|
||||||
|
|
||||||
|
# change to the dotfiles directory
|
||||||
|
|
||||||
|
stow: submodules
|
||||||
|
find . -maxdepth 0 -type d | xargs stow -v
|
||||||
|
|
||||||
|
submodules:
|
||||||
|
git submodule update --init --recursive
|
||||||
|
|
||||||
|
docker: Dockerfile
|
||||||
|
git clone . /tmp/dotfiles
|
||||||
|
docker build -t balkian/devmachine /tmp/dotfiles
|
||||||
|
|
||||||
|
.PHONY: stow submodules docker
|
@ -11,6 +11,11 @@ The fast way:
|
|||||||
```bash
|
```bash
|
||||||
curl -#L https://github.com/balkian/dotfiles/tarball/master | tar -xzv --strip-components 1 --exclude={README.md}
|
curl -#L https://github.com/balkian/dotfiles/tarball/master | tar -xzv --strip-components 1 --exclude={README.md}
|
||||||
```
|
```
|
||||||
|
### Quick install
|
||||||
|
|
||||||
|
```
|
||||||
|
make
|
||||||
|
```
|
||||||
### Install
|
### Install
|
||||||
Each folder contains the configuration files for a specific program, as they would appear under "$HOME" (~).
|
Each folder contains the configuration files for a specific program, as they would appear under "$HOME" (~).
|
||||||
To install them, first initialize the submodules:
|
To install them, first initialize the submodules:
|
||||||
@ -24,4 +29,4 @@ Then, you can use the [GNU Stow](https://www.gnu.org/software/stow/) utility to
|
|||||||
stow <modules that you want to install>
|
stow <modules that you want to install>
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, you may simply copy the files to your $HOME folder.
|
Alternatively, you may simply copy the files to your $HOME folder.
|
||||||
|
24
make.sh
24
make.sh
@ -1,24 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
############################
|
|
||||||
# .make.sh
|
|
||||||
# This script creates symlinks from the home directory to any desired dotfiles in ~/dotfiles
|
|
||||||
############################
|
|
||||||
|
|
||||||
########## Variables
|
|
||||||
|
|
||||||
# change to the dotfiles directory
|
|
||||||
cd `dirname $0`
|
|
||||||
|
|
||||||
########## Don't forget the submodules
|
|
||||||
git submodule init
|
|
||||||
git submodule update --recursive
|
|
||||||
|
|
||||||
olddir=~/dotfiles$(date +%Y-%m-%d_%H:%M:%S) # old dotfiles backup directory
|
|
||||||
files=$(ls -1 --ignore="not_dots" --ignore="README.md" --ignore="make.sh" --ignore="Docker" $PWD) # list of files/folders to symlink in homedir
|
|
||||||
|
|
||||||
##########
|
|
||||||
|
|
||||||
# create dotfiles_old in homedir
|
|
||||||
for file in $files; do
|
|
||||||
stow -v $file
|
|
||||||
done
|
|
Loading…
Reference in New Issue
Block a user