Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support for different node installations #271

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,19 @@ docker run -e TERM -e COLORTERM -e LC_ALL=C.UTF-8 -w /root -it --rm alpine sh -u
```bash
docker run -e TERM -e COLORTERM -w /root -it --rm ubuntu sh -uec '
apt-get update
apt-get install -y curl build-essential sudo
apt-get install -y curl build-essential sudo python3 g++
su -c bash -c "$(curl -fsSL https://raw.githubusercontent.com/CodelyTV/dotly/HEAD/installer)"
su -c zsh'
```
</details>


<details>
<summary>Arch Linux:</summary>

```bash
docker run -e TERM -e COLORTERM -w /root -it --rm archlinux sh -uec '
pacman -Sy curl base-devel sudo python3 git
su -c bash -c "$(curl -fsSL https://raw.githubusercontent.com/CodelyTV/dotly/HEAD/installer)"
su -c zsh'
```
Expand Down
14 changes: 14 additions & 0 deletions dotfiles_template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,17 @@ bash <(curl -s https://raw.githubusercontent.com/CodelyTV/dotly/HEAD/restorer)
You need to know your GitHub username, repository and install ssh key if your repository is private.

It also supports other git repos, but you need to know your git repository url.

## Restore your Dotfiles on Docker
<details>
<summary>Using Debian:</summary>

```bash
docker run -e TERM -e COLORTERM -w /root -it --rm debian sh -uec '
apt-get update
export USER="__GITHUB_USER__"
apt-get install -y curl build-essential sudo python3 git g++
su -c bash -c "$(curl -fsSL https://raw.githubusercontent.com/CodelyTV/dotly/HEAD/restorer)"
su -c zsh'
```
</details>
5 changes: 3 additions & 2 deletions installer
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ _w "~ │ 🚀 Welcome to the ${green}dotly${normal} installer! │ ~"
_w " └────────────────────────────────────┘"
_w
_q "Where do you want your dotfiles to be located? (default ~/.dotfiles)" "DOTFILES_PATH"
DOTFILES_PATH="${DOTFILES_PATH:-$HOME/.dotfiles}"
DOTFILES_PATH="$(eval echo "$DOTFILES_PATH")"
UNEXPANDED_DOTFILES_PATH="${DOTFILES_PATH:-\$HOME/.dotfiles}"
DOTFILES_PATH="$(eval echo "$UNEXPANDED_DOTFILES_PATH")"
export DOTFILES_PATH="$DOTFILES_PATH"
export UNEXPANDED_DOTFILES_PATH="$UNEXPANDED_DOTFILES_PATH"

dotly_inner_path="modules/dotly"
export DOTLY_PATH="$DOTFILES_PATH/$dotly_inner_path"
Expand Down
6 changes: 3 additions & 3 deletions scripts/dotfiles/create
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ source "$DOTLY_PATH/scripts/core/_main.sh"
docs::parse "$@"

dotfiles::apply_templating() {
sed -i -e "s|XXX_DOTFILES_PATH_XXX|$DOTFILES_PATH|g" "$DOTFILES_PATH/bin/sdot"
sed -i -e "s|XXX_DOTFILES_PATH_XXX|$DOTFILES_PATH|g" "$DOTFILES_PATH/shell/bash/.bashrc"
sed -i -e "s|XXX_DOTFILES_PATH_XXX|$DOTFILES_PATH|g" "$DOTFILES_PATH/shell/zsh/.zshenv"
sed -i -e "s|XXX_DOTFILES_PATH_XXX|$UNEXPANDED_DOTFILES_PATH|g" "$DOTFILES_PATH/bin/sdot"
sed -i -e "s|XXX_DOTFILES_PATH_XXX|$UNEXPANDED_DOTFILES_PATH|g" "$DOTFILES_PATH/shell/bash/.bashrc"
sed -i -e "s|XXX_DOTFILES_PATH_XXX|$UNEXPANDED_DOTFILES_PATH|g" "$DOTFILES_PATH/shell/zsh/.zshenv"
}

if [ ! -d "$DOTFILES_PATH/shell" ]; then
Expand Down