1
0
Fork 0
mirror of https://github.com/kou029w/dotfiles.git synced 2025-02-27 02:05:16 +00:00

Compare commits

..

No commits in common. "f3b0f9dfe2b6b22eee4db4cc92573b41c82ffd5a" and "95cd3eb90b5645e750f9ed3e8dd4efd75ffa8260" have entirely different histories.

5 changed files with 15 additions and 21 deletions

View file

@ -2,8 +2,8 @@
[[ -f /usr/share/bash-completion/bash_completion ]] && . /usr/share/bash-completion/bash_completion
[[ "$TERM" == xterm-256color ]] && PS1='\[\e]0;\u@\h: \w\a\]'
HISTCONTROL=ignoreboth:erasedups
HISTFILESIZE=$((0x7fffffff))
HISTSIZE=$((0x7fffffff))
HISTFILESIZE=2000000
HISTSIZE=2000000
PROMPT_COMMAND='[[ $_PWD == $PWD ]] || { _PWD=$PWD; ls; }'
PS1=$PS1'\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
PS1=${PS1%'\$ '}'$(__git_ps1 " \[\033[32m\](%s)\[\033[00m\]")\n\$ '

View file

@ -13,5 +13,5 @@ sudo ./install
or
```sh
sudo ./install homebrew desktop
sudo ./install desktop
```

View file

@ -1,18 +0,0 @@
#!/bin/bash
set -euo pipefail
cd -- "$(dirname -- "$0")"
function install_homebrew_packages() {
local uid
uid=${SUDO_UID:-$(id -u)}
sudo --user="#$uid" \
mkdir -p /home/linuxbrew/.linuxbrew
sudo --user="#$uid" \
NONINTERACTIVE=1 \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
sudo --user="#$uid" \
/home/linuxbrew/.linuxbrew/bin/brew bundle --global
}
[[ $(uname -sm) =~ ^(Linux x86_64)$ ]] \
&& install_homebrew_packages

View file

@ -5,6 +5,8 @@ cd -- "$(dirname -- "$0")"
if (($(id -u) == 0)); then
[[ -f /etc/debian_version ]] \
&& install_apt_packages
[[ $(uname -sm) =~ ^(Linux x86_64|Darwin .*)$ ]] \
&& install_homebrew_packages
fi
install_dotfiles
install_addons "$@"

View file

@ -27,6 +27,16 @@ function install_apt_packages() {
rsync -rv etc/apt/sources.list.d/ "$apt_sources_dir"
}
function install_homebrew_packages() {
local uid
uid=${SUDO_UID:-$(id -u)}
sudo --user="#$uid" \
NONINTERACTIVE=1 \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
sudo --user="#$uid" \
/home/linuxbrew/.linuxbrew/bin/brew bundle --file=.Brewfile
}
function install_addons() {
local addon
for addon in "$@"; do