-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testing dockerfile for brew, add import history script
- Loading branch information
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM ubuntu:22.04 | ||
|
||
WORKDIR /root | ||
|
||
# ubuntu only | ||
RUN apt update | ||
RUN apt install -y curl git build-essential | ||
|
||
|
||
# Install brew | ||
RUN curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | env NONINTERACTIVE=1 bash | ||
|
||
RUN echo 'export PATH="$PATH:/home/linuxbrew/.linuxbrew/bin"' >> "$HOME/.bashrc" | ||
ENV PATH="$PATH:/home/linuxbrew/.linuxbrew/bin" | ||
|
||
RUN brew doctor | ||
|
||
# Xclip ubuntu only | ||
RUN brew install unzip xclip vim neovim | ||
|
||
RUN brew install starship neofetch fzf btop wget \ | ||
pyenv nvm \ | ||
lsd fd ripgrep bat `# rust utils` | ||
|
||
# INSTALL VIM THINGS | ||
RUN curl -fLo '~/.vim/autoload/plug.vim' --create-dirs \ | ||
'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' | ||
|
||
RUN rm -rf .bashrc .zshrc && curl -Lks https://raw.githubusercontent.com/dhvcc/configs/master/.cfg/install.sh | /bin/sh | ||
|
||
# Install manually or in script | ||
#ENV NVM_DIR="$HOME/.nvm" | ||
#RUN test -s "/home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh" && . "/home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh"; nvm install 16 | ||
|
||
# ubuntu only | ||
RUN apt install -y zsh | ||
# | ||
RUN "$HOME/.cfg/scripts/install-omb.sh" | ||
RUN "$HOME/.cfg/scripts/install-omz.sh" | ||
|
||
CMD bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import time | ||
|
||
|
||
def main(): | ||
timestamp = None | ||
with open("~/.bash_history", "rt") as bash_history: | ||
with open("~/.zsh_history", "wt") as zsh_history: | ||
for line in bash_history.readlines(): | ||
line = line.rstrip('\n') | ||
if line.startswith('#') and timestamp is None: | ||
t = line[1:] | ||
if t.isdigit(): | ||
timestamp = t | ||
continue | ||
else: | ||
zsh_history.write(': %s:0;%s\n' % (timestamp or time.time(), line)) | ||
timestamp = None | ||
|
||
|
||
if __name__ == '__main__': | ||
main() | ||
|