Merge remote-tracking branch 'vdesktop/master'

This commit is contained in:
David Tomaschik
2018-01-27 10:31:51 -08:00
3 changed files with 23 additions and 9 deletions

View File

@@ -8,10 +8,13 @@ alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo
alias luksFormat='cryptsetup luksFormat -s 512 -c aes-xts-plain64 -h sha256 -i 15000'
# Colors
if [ `uname` != 'Darwin' ] ; then
# Should have a better way to check for GNU versions
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
fi
# Easy upgrade
alias dist-upgrade="sudo sh -c 'apt-get update && apt-get -y dist-upgrade'"

View File

@@ -20,9 +20,13 @@ esac
autoload -U colors && colors
PS1="%{$fg[black]%}[%{$fg[yellow]%}%h%{$fg[black]%}] %{%(!.$fg[red].$fg[green])%}%8>..>%n%>>%{$fg[white]%}@%{$fg[blue]%}%12>..>%m%>>%{$fg[white]%}:%{$fg[green]%}%32<...<%~%<<%{$fg[white]%}%#%{$reset_color%} "
# LS Colors
if [ `uname` != 'Darwin' ] ; then
# ls Colors
alias ls='ls --color'
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
else
alias ls='ls -G'
fi
# Load oh-my-zsh
if [ -d $HOME/.oh-my-zsh ] ; then

View File

@@ -3,6 +3,13 @@
set -o nounset
set -o errexit
FINDTYPE="-xtype"
if [ `uname` == 'Darwin' ] ; then
# MacOS specifics
FINDTYPE="-type"
fi
function prerequisites {
if which zsh > /dev/null 2>&1 ; then
if [[ $- == *i* ]] ; then
@@ -30,7 +37,7 @@ function install_dotfile_dir {
-name install.sh -o \
-name README.md -o \
-name .gitignore \) \
-prune -o -xtype f -print | \
-prune -o ${FINDTYPE} f -print | \
while read dotfile ; do
local TARGET="${HOME}/.${dotfile#${SRCDIR}/}"
mkdir -p `dirname "${TARGET}"`
@@ -42,7 +49,7 @@ function install_basic_dir {
local SRCDIR="${1}"
local DESTDIR="${2}"
local file
find "${SRCDIR}" -xtype f -print | \
find "${SRCDIR}" ${FINDTYPE} f -print | \
while read file ; do
local TARGET="${2}/${file#${SRCDIR}/}"
mkdir -p `dirname "${TARGET}"`