mirror of
https://github.com/balkian/dotfiles.git
synced 2024-11-21 03:32: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
|
||||
|
||||
RUN apt-get update -y
|
||||
RUN apt-get install -y build-essential
|
||||
RUN apt-get install -y cmake
|
||||
RUN apt-get install -y curl
|
||||
RUN apt-get install -y diffstat
|
||||
RUN apt-get install -y git
|
||||
RUN apt-get install -y pkg-config
|
||||
RUN apt-get install -y python
|
||||
RUN apt-get install -y python-dev
|
||||
RUN apt-get install -y python3
|
||||
RUN apt-get install -y tmux
|
||||
RUN apt-get install -y vim
|
||||
RUN apt-get install -y zsh
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y build-essential \
|
||||
cmake \
|
||||
curl \
|
||||
diffstat \
|
||||
git \
|
||||
pkg-config \
|
||||
python \
|
||||
python-dev \
|
||||
python \
|
||||
python3 \
|
||||
tmux \
|
||||
stow \
|
||||
sudo \
|
||||
vim \
|
||||
zsh && \
|
||||
apt clean
|
||||
|
||||
RUN curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python2
|
||||
RUN pip install virtualenv
|
||||
RUN pip install virtualenvwrapper
|
||||
RUN curl -SL 'https://bootstrap.pypa.io/get-pip.py' | python3
|
||||
RUN pip install virtualenv virtualenvwrapper
|
||||
|
||||
# Setup home environment
|
||||
RUN useradd dev
|
||||
@ -38,17 +41,15 @@ VOLUME /usr/src/app
|
||||
|
||||
WORKDIR /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
|
||||
|
||||
# Link in shared parts of the home directory
|
||||
RUN ln -s /var/shared/.ssh
|
||||
RUN ln -s /usr/src/app
|
||||
RUN ln -s /var/shared/.ssh && ln -s /usr/src/app
|
||||
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
|
||||
|
||||
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
|
||||
curl -#L https://github.com/balkian/dotfiles/tarball/master | tar -xzv --strip-components 1 --exclude={README.md}
|
||||
```
|
||||
### Quick install
|
||||
|
||||
```
|
||||
make
|
||||
```
|
||||
### Install
|
||||
Each folder contains the configuration files for a specific program, as they would appear under "$HOME" (~).
|
||||
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>
|
||||
```
|
||||
|
||||
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