mirror of
https://github.com/kou029w/dotfiles.git
synced 2025-02-26 17:55:16 +00:00
Compare commits
2 commits
95cd3eb90b
...
f3b0f9dfe2
Author | SHA1 | Date | |
---|---|---|---|
f3b0f9dfe2 | |||
d1514ba0e1 |
5 changed files with 21 additions and 15 deletions
4
.bashrc
4
.bashrc
|
@ -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=2000000
|
||||
HISTSIZE=2000000
|
||||
HISTFILESIZE=$((0x7fffffff))
|
||||
HISTSIZE=$((0x7fffffff))
|
||||
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\$ '
|
||||
|
|
|
@ -13,5 +13,5 @@ sudo ./install
|
|||
or
|
||||
|
||||
```sh
|
||||
sudo ./install desktop
|
||||
sudo ./install homebrew desktop
|
||||
```
|
||||
|
|
18
homebrew/install
Executable file
18
homebrew/install
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/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
|
2
install
2
install
|
@ -5,8 +5,6 @@ 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 "$@"
|
||||
|
|
10
mod.bash
10
mod.bash
|
@ -27,16 +27,6 @@ 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
|
||||
|
|
Loading…
Add table
Reference in a new issue