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.
f3b0f9dfe2
...
95cd3eb90b
5 changed files with 15 additions and 21 deletions
4
.bashrc
4
.bashrc
|
@ -2,8 +2,8 @@
|
||||||
[[ -f /usr/share/bash-completion/bash_completion ]] && . /usr/share/bash-completion/bash_completion
|
[[ -f /usr/share/bash-completion/bash_completion ]] && . /usr/share/bash-completion/bash_completion
|
||||||
[[ "$TERM" == xterm-256color ]] && PS1='\[\e]0;\u@\h: \w\a\]'
|
[[ "$TERM" == xterm-256color ]] && PS1='\[\e]0;\u@\h: \w\a\]'
|
||||||
HISTCONTROL=ignoreboth:erasedups
|
HISTCONTROL=ignoreboth:erasedups
|
||||||
HISTFILESIZE=$((0x7fffffff))
|
HISTFILESIZE=2000000
|
||||||
HISTSIZE=$((0x7fffffff))
|
HISTSIZE=2000000
|
||||||
PROMPT_COMMAND='[[ $_PWD == $PWD ]] || { _PWD=$PWD; ls; }'
|
PROMPT_COMMAND='[[ $_PWD == $PWD ]] || { _PWD=$PWD; ls; }'
|
||||||
PS1=$PS1'\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
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\$ '
|
PS1=${PS1%'\$ '}'$(__git_ps1 " \[\033[32m\](%s)\[\033[00m\]")\n\$ '
|
||||||
|
|
|
@ -13,5 +13,5 @@ sudo ./install
|
||||||
or
|
or
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo ./install homebrew desktop
|
sudo ./install desktop
|
||||||
```
|
```
|
||||||
|
|
|
@ -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
|
|
2
install
2
install
|
@ -5,6 +5,8 @@ cd -- "$(dirname -- "$0")"
|
||||||
if (($(id -u) == 0)); then
|
if (($(id -u) == 0)); then
|
||||||
[[ -f /etc/debian_version ]] \
|
[[ -f /etc/debian_version ]] \
|
||||||
&& install_apt_packages
|
&& install_apt_packages
|
||||||
|
[[ $(uname -sm) =~ ^(Linux x86_64|Darwin .*)$ ]] \
|
||||||
|
&& install_homebrew_packages
|
||||||
fi
|
fi
|
||||||
install_dotfiles
|
install_dotfiles
|
||||||
install_addons "$@"
|
install_addons "$@"
|
||||||
|
|
10
mod.bash
10
mod.bash
|
@ -27,6 +27,16 @@ function install_apt_packages() {
|
||||||
rsync -rv etc/apt/sources.list.d/ "$apt_sources_dir"
|
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() {
|
function install_addons() {
|
||||||
local addon
|
local addon
|
||||||
for addon in "$@"; do
|
for addon in "$@"; do
|
||||||
|
|
Loading…
Add table
Reference in a new issue