Commit 0ba78fe5 authored by david's avatar david 💬

sync

parent c5f7a520
......@@ -61,7 +61,7 @@ cleanup() {
link=$(ls -la $destination | awk '{print $9" "$10" "$11}')
# It should be safe to just remove symbolic links because no data is actually deleted.
message d "Symbolic link exists, attempting to remove it[$link]."
output=""; output=$(rm $destination 2>&1); failsafe $? $output
output=$(rm $destination 2>&1); failsafe $? $output
message i "Removed symbolic link[$link]."
elif [ -a $destination ]; then
# Rename data to $destination.old
......@@ -75,6 +75,15 @@ cleanup() {
# **** start of script ****
#brainstorm
- run oh-my-zsh installation
- install pure
- update zshrc for pure
- clone plugins like zsh-syntax-highlighting and my personal
- update zshrc for plugins
- seperate repo for plugins? or just one plugin for all my stuff?
message d "Warming up dotfiles installer."
#message d "Initiating preflight checks."
......@@ -86,25 +95,28 @@ message d "Warming up dotfiles installer."
# download dotfiles
cleanup "$root"
message d "Attempting to clone git repository[$repo] into $root."
output=""; output=$(git clone $repo $root 2>&1); failsafe $? $output
message i "Cloned git repository into $root."
output=$(git clone $repo $root 2>&1); failsafe $? $output
message i "Cloned dotfiles."
# create zshfunctions folder [.zfunctions]
#cleanup $plugins
message d "Attempting to create functions directory[$plugins]."
if [ ! -d $plugins ]; then
output=""; output=$(mkdir $plugins 2>&1); failsafe $? $output
fi
message i "Created functions folder[$plugins]."
#message d "Attempting to create functions directory[$plugins]."
#if [ ! -d $plugins ]; then
# output=$(mkdir $plugins 2>&1); failsafe $? $output
#fi
#message i "Created functions folder[$plugins]."
# download pure
output=""; output=$(wget -O $plugins/pure.zsh https://raw.githubusercontent.com/sindresorhus/pure/master/pure.zsh 2>&1); failsafe $? $output
output=""; output=$(wget -O $plugins/async.zsh https://raw.githubusercontent.com/sindresorhus/pure/master/async.zsh 2>&1); failsafe $? $output
message i "Downloaded ZSH plugins into functions folder[$plugins]."
#output=$(wget -O $plugins/pure.zsh https://raw.githubusercontent.com/sindresorhus/pure/master/pure.zsh 2>&1); failsafe $? $output
#output=$(wget -O $plugins/async.zsh https://raw.githubusercontent.com/sindresorhus/pure/master/async.zsh 2>&1); failsafe $? $output
#message i "Downloaded ZSH plugins into functions folder[$plugins]."
output=$(git clone https://github.com/sindresorhus/pure.git xyz 2>&1); failsafe $? $output
message i "Clone pure."
# link .zshrc
cleanup "$HOME/.zshrc"
output=""; output=$(ln -s $root/zsh/zshrc $HOME/.zshrc 2>&1); failsafe $? $output
output=$(ln -s $root/zsh/zshrc $HOME/.zshrc 2>&1); failsafe $? $output
message i "Linked .zshrc."
message d "Installer finished."
......
......@@ -9,7 +9,7 @@ for plugin ($HOME/.dotfiles/zsh/*.zsh); do
source $plugin
done
# pure & zfunctions
# pure
autoload -U promptinit; promptinit
prompt pure
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment