-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·66 lines (55 loc) · 1.75 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
# Exit immediately if a command exits with a non-zero status.
# set -e
#!/bin/sh
# if [ -z "$USER" ]; then
# USER=$(id -un)
# fi
#
export DOTFILES=$HOME/dotfiles
echo "DOTFILES=$DOTFILES"
mv /workspaces/.codespaces/.persistedshare/dotfiles $HOME/dotfiles
#
cd "$HOME"
#
# # Make passwordless sudo work
export SUDO_ASKPASS=/bin/true
export HOMEBREW_BUNDLE_FILE_GLOBAL="~/dotfiles/devcontainer/Brewfile.linux"
# if [ "$EUID" -ne 0 ]; then
# echo "Please run as root"
# exit
# fi
# # Install necessary build tools and libraries via apt
# echo "Installing build dependencies..."
# apt-get update && apt-get install -y \
# libevent-dev \
# ncurses-dev \
# build-essential \
# bison \
# pkg-config \
# ruby-full \
# libssl-dev \
# zlib1g-dev \
# libncurses5-dev \
# libreadline-dev \
# libyaml-dev \
# libxslt-dev \
# libffi-dev \
# libtool \
# unixodbc-dev
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew bundle --global
# git clone https://github.com/prokizzle/nvim ~/.config/nvim
yes | rcup -d dotfiles -x README.md -x LICENSE -x Brewfile -x setup.sh
# Install tmux Plugin Manager (TPM) without modifying tmux.conf
echo "Installing tmux Plugin Manager (TPM)..."
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
echo "TPM installed at ~/.tmux/plugins/tpm."
# Install neovim Ruby and Node.js hosts
echo "Installing Neovim Ruby and Node.js hosts..."
gem install neovim
npm install -g neovim
echo "source $DOTFILES/devcontainer/alias.sh" >> ~/.bashrc
source $DOTFILES/devcontainer/alias.sh