Update configs to better support homedirs

This commit is contained in:
Bradley Anderson
2017-08-24 10:24:55 -07:00
parent 4acde23c44
commit a8162b3568
5 changed files with 24 additions and 24 deletions
Executable
BIN
View File
Binary file not shown.
+3 -3
View File
@@ -1,3 +1,3 @@
PATH=$PATH:~/.gem/ruby/2.2.0/bin
PATH=$PATH:~/bin
PATH=$PATH:~/.local/bin
PATH=~/.gem/ruby/2.2.0/bin:$PATH
PATH=~/bin:$PATH
PATH=~/.local/bin:$PATH
+19 -19
View File
@@ -4,7 +4,11 @@ DIR=~/dotfiles # dotfiles directory
HOMEDIR=~/homedirs/users/bradleya
SCRIPT_NAME=${0##*/}
homefiles="
"
# .local
files="
bin
bashrc
bash_profile
gitconfig
@@ -17,9 +21,6 @@ tmux
dotfile_overrides/zshrc_local
dotfile_overrides/profile.local
"
directories="
tmux
"
gits="
gruvbox
oh-my-zsh
@@ -34,40 +35,39 @@ function copy_files {
mkdir $HOMEDIR
# Change to script directory
cd $DIR
cd $DIR || return
# Copy over this updater to HOMEDIR
echo "Copying $SCRIPT_NAME ($SCRIPT_NAME -> $HOMEDIR/$SCRIPT_NAME)"
cp $SCRIPT_NAME $HOMEDIR
cp "$SCRIPT_NAME" "$HOMEDIR"
# Copy over each file in files to HOMEDIR
for file in $files; do
if [[ -f $file || -d $file ]]; then
file_name=${file##*/}
echo "Copying $file ($DIR/$file -> $HOMEDIR/.$file_name)"
cp -r $DIR/$file $HOMEDIR/.$file_name
cp -r $DIR/"$file" $HOMEDIR/."$file_name"
fi
done
# Copy over each directory in directories to HOMEDIR
# for directory in $directories; do
# if [[ -f $directory || -d $directory ]]; then
# dir_name=${directory##*/}
# echo "Copying $directory ($DIR/$directory -> $HOMEDIR/.$dir_name)"
# cp -r $DIR/$directory $HOMEDIR/
# mv $HOMEDIR/$dir_name $HOMEDIR/.$dir_name
# fi
# done
# Copy over each file in homefiles to HOMEDIR
for file in $homefiles; do
if [[ -f ~/$file || -d ~/$file ]]; then
file_name=${file##*/}
echo "Copying $file ($file -> $HOMEDIR/$file_name)"
cp -r ~/"$file" $HOMEDIR/"$file_name"
fi
done
# Copy over each git repo in gits without the .git folder to HOMEDIR
for repo in $gits; do
if [[ -d $repo ]]; then
repo_name=${repo##*/}
echo "Copying $repo without .git folder ($DIR/$repo -> $HOMEDIR/.$repo_name)"
pushd $DIR/$repo >/dev/null
mkdir $HOMEDIR/.$repo_name
git archive master | tar -x -C $HOMEDIR/.$repo_name
popd >/dev/null
pushd $DIR/"$repo" || return
mkdir $HOMEDIR/."$repo_name"
git archive master | tar -x -C $HOMEDIR/."$repo_name"
popd || return
fi
done
}
+1 -1
View File
@@ -257,7 +257,7 @@ NeoBundle 'mattn/emmet-vim'
NeoBundle 'mattn/webapi-vim'
" - Python -
NeoBundle 'klen/python-mode'
" NeoBundle 'klen/python-mode'
NeoBundle 'davidhalter/jedi-vim'
" - C# -
+1 -1
View File
@@ -136,7 +136,7 @@ if [[ -a $POWERLINE_ROOT/bindings/zsh/powerline.zsh ]]; then
# Prefer user-set powerline directory
sources+=$POWERLINE_ROOT/bindings/zsh/powerline.zsh
else
echo "Attempting to source Powerline bindings from default locations.\nPlease set \$POWERLINE_ROOT in .zshrc.local"
echo "Attempting to source Powerline bindings from default locations.\nPlease set \$POWERLINE_ROOT in .profile.local"
# If $POWERLINE_ROOT not set or set incorrectly, try default locations
sources+=$HOME/.local/lib/python2.6/site-packages/powerline/bindings/zsh/powerline.zsh
sources+=$HOME/.local/lib/python2.6/dist-packages/powerline/bindings/zsh/powerline.zsh