I've finally published my local setup, check it out!
If you want a preview of this setup, you should try this!
I have provided a simple Dockerfile /DockerFile for sandbox testing.
WARNING: Never blindly trust commands you didn't write yourself. I advice you to inspect commands before running them.
Command to open a new container (can safely be repeated):
NOTE: This does not run the installation, continue in the section for other users.
cd ~ && rm -rf /tmp/docker-home-testing && mkdir /tmp/docker-home-testing && cd /tmp/docker-home-testing && curl -LJO https://raw.githubusercontent.com/emilte/home/master/Dockerfile && docker build --force-rm --rm -t home-test . ; docker run -it home-test
This command will:
- Create a temporary directory in
/tmp/docker-home-testing
.- Fetch Dockerfile.
- Build image and run container.
If you only want the last part of starting a new clean container (can safely be repeated):
docker build --force-rm --rm -t home-test . ; docker run -it home-test
Does only step 3 above.
Dedicated to myself, you should probably see the section for other users.
WARNING: This command will ensure that the home directory reflects this repo. The old setup will be backed up in a branch named
home-old
.
cd ~ && git init && git config --global user.email "you@example.com" && git config --global user.name "Your Name" && git remote add origin git@github.com:emilte/home.git && git fetch --all && git checkout -b "home-old" && git add . && git commit -m "Old home directory" && git checkout master -f ; bash .configure_bash.sh n
You probably don't want the exact same setup as me. Run this command for interactive installation:
WARNING: This command will ensure that the home directory reflects this repo. The old setup will be backed up in a branch named
home-old
.
WARNING: Never blindly trust commands you didn't write yourself. I advice you to inspect commands before running them.
cd ~ && git init && git config --global user.email "you@example.com" && git config --global user.name "Your Name" && git remote add origin https://github.com/emilte/home.git && git fetch --all && git checkout -b "home-old" && git add . && git commit -m "Old home directory" && git checkout master -f ; bash .configure_bash.sh y
This command will:
cd ~
Go to home directory.git init
Hack to clone repo into non-empty existing path. https://stackoverflow.com/questions/50361138/destination-path-already-exists-and-is-not-an-empty-directorygit config --global user.email "you@example.com" && git config --global user.name "Your Name"
Added because git complained about missing config. This will be overwritten soon anyway.git remote add origin https://github.com/emilte/home.git
Set this repo as remote.git fetch --all
Fetch all branches and changes to prepare for incoming changes.git checkout -b "home-old"
Create branchhome-old
for current setup.git add .
Stage all files and folders in current setup.git commit -m "Old home directory"
Commit current setup to branchhome-old
.git checkout master -f
Force new setup in home directory.bash .configure_bash.sh y
Run configuration for bash in interactive mode.
- https://stackoverflow.com/a/45514197/12616507
- https://stackoverflow.com/questions/50361138/destination-path-already-exists-and-is-not-an-empty-directory
- https://curl.se/docs/manpage.html
- https://codefather.tech/blog/bash-unary-operator-expected/
- https://ryanstutorials.net/bash-scripting-tutorial/bash-if-statements.php
- https://stackoverflow.com/a/2642592/12616507
- https://hub.docker.com/_/ubuntu
- https://ggkbase-help.berkeley.edu/how-to/install-pyenv/
- https://unix.stackexchange.com/a/594845
- https://stackoverflow.com/a/6212408/12616507
- https://github.com/emilyst/home
- https://github.com/emilte/terminal
- https://linuxize.com/post/bash-functions/