Compare commits

..

No commits in common. "5c0d3f044e8ced7ba646a8bb6b2517db0b3e4151" and "8f30c2f5ccaa74791c9c5869e82272aff74322d9" have entirely different histories.

7 changed files with 43 additions and 51 deletions

View File

@ -4,15 +4,23 @@ dry="0"
execute() {
log "execute $@"
[[ $dry != "1" ]] && "$@"
if [[ $dry != "1" ]]; then
"$@"
fi
}
log() {
[[ $dry != "1" ]] && echo "$@" || echo "[DRY RUN]: $@"
if [[ $dry != "1" ]]; then
echo "$@"
else
echo "[DRY RUN]: $@"
fi
}
while [[ $# > 0 ]]; do
[[ $1 == "--dry" ]] && dry="1"
if [[ $1 == "--dry" ]]; then
dry="1"
fi
shift
done
@ -23,8 +31,11 @@ copy_dir() {
to=$2
pushd $from > /dev/null
dirs=(`find . -mindepth 1 -maxdepth 1 -type d`)
echo $dirs
for dir in $dirs; do
[[ -d $to/$dir ]] && execute rm -rf $to/$dir
if [[ -d $to/$dir ]]; then
execute rm -rf $to/$dir
fi
execute cp -rp $dir $to/$dir
done
popd > /dev/null
@ -34,10 +45,11 @@ copy_file() {
from=$1
to=$2
filename=$(basename $from)
[[ -e $to/$filename ]] && execute rm $to/$filename
if [[ -e $to/$filename ]]; then
execute rm $to/$filename
fi
execute cp -p $from $to/$filename
}
copy_dir .config $HOME/.config
copy_dir .local $HOME/.local
# copy_file .zxcv $HOME

View File

@ -1,10 +1,5 @@
#!/bin/zsh
[[ ! -d $HOME/.config ]] && mkdir $HOME/.config
[[ ! -d $HOME/.local ]] && mkdir $HOME/.local
[[ ! -d $HOME/.local/bin ]] && mkdir $HOME/.local/bin
[[ ! -d $HOME/.local/build ]] && mkdir $HOME/.local/build
[[ ! -d $HOME/.local/tmp ]] && mkdir $HOME/.local/tmp
# [[ ! -d $HOME/dbox ]] && mkdir $HOME/dbox
[[ ! -d $HOME/dev ]] && mkdir $HOME/dev
if [[ ! -d $HOME/bin ]]; then
mkdir $HOME/bin
fi

16
run
View File

@ -5,15 +5,25 @@ dry="0"
execute() {
log "execute $@"
[[ $dry != "1" ]] && "$@"
if [[ $dry != "1" ]]; then
"$@"
fi
}
log() {
[[ $dry != "1" ]] && echo "$@" || echo "[DRY RUN]: $@"
if [[ $dry != "1" ]]; then
echo "$@"
else
echo "[DRY RUN]: $@"
fi
}
while [[ $# > 0 ]]; do
[[ $1 == "--dry" ]] && dry="1" || single_script_filter="$1"
if [[ $1 == "--dry" ]]; then
dry="1"
else
single_script_filter="$1"
fi
shift
done

3
runs/dev_tools Executable file
View File

@ -0,0 +1,3 @@
#!/bin/zsh
brew install git tmux

View File

@ -1,2 +0,0 @@
#!/bin/zsh
brew install git

View File

@ -1,32 +1,8 @@
#!/bin/zsh
install_command="sudo apt install"
[[ -x $(which brew) ]] && install_command="brew install"
neovim_dir=$HOME/.local/build/neovim
neovim_version="v0.10.3"
[ ! -z $NVIM_VERSION ] && neovim_version="$NVIM_VERSION"
echo "neovim_version: \"$neovim_version\""
[ ! -d $neovim_dir ] && git clone https://github.com/neovim/neovim.git $neovim_dir
git -C $neovim_dir fetch --all
git -C $neovim_dir checkout $neovim_version
$install_command cmake gettext lua@5.1 liblua5.1-0-dev
make -C $neovim_dir clean
make -C $neovim_dir CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make -C $neovim_dir install
# lines below from primeagen's dev repo, uncomment/edit as needed
# git clone https://github.com/ThePrimeagen/harpoon.git $HOME/personal/harpoon
# cd $HOME/personal/harpoon
# git fetch
# git checkout harpoon2
# git clone https://github.com/ThePrimeagen/vim-apm.git $HOME/personal/vim-apm
# git clone https://github.com/ThePrimeagen/vim-with-me.git $HOME/personal/vim-with-me
# git clone https://github.com/ThePrimeagen/vim-arcade.git $HOME/personal/vim-arcade
# git clone https://github.com/ThePrimeagen/caleb.git $HOME/personal/caleb
# git clone https://github.com/nvim-lua/plenary.nvim.git $HOME/personal/plenary
neovim_dir=$HOME/bin/neovim
git clone -b v0.10.3 https://github.com/neovim/neovim.git $neovim_dir
brew install cmake gettext lua5.1 liblua5.1-0-dev
cd $neovim_dir
make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make install

View File

@ -1,2 +0,0 @@
#!/bin/zsh
brew install tmux