Compare commits
2 Commits
8f30c2f5cc
...
5c0d3f044e
Author | SHA1 | Date | |
---|---|---|---|
5c0d3f044e | |||
cff9341d52 |
@ -4,23 +4,15 @@ dry="0"
|
|||||||
|
|
||||||
execute() {
|
execute() {
|
||||||
log "execute $@"
|
log "execute $@"
|
||||||
if [[ $dry != "1" ]]; then
|
[[ $dry != "1" ]] && "$@"
|
||||||
"$@"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
log() {
|
log() {
|
||||||
if [[ $dry != "1" ]]; then
|
[[ $dry != "1" ]] && echo "$@" || echo "[DRY RUN]: $@"
|
||||||
echo "$@"
|
|
||||||
else
|
|
||||||
echo "[DRY RUN]: $@"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while [[ $# > 0 ]]; do
|
while [[ $# > 0 ]]; do
|
||||||
if [[ $1 == "--dry" ]]; then
|
[[ $1 == "--dry" ]] && dry="1"
|
||||||
dry="1"
|
|
||||||
fi
|
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -31,11 +23,8 @@ copy_dir() {
|
|||||||
to=$2
|
to=$2
|
||||||
pushd $from > /dev/null
|
pushd $from > /dev/null
|
||||||
dirs=(`find . -mindepth 1 -maxdepth 1 -type d`)
|
dirs=(`find . -mindepth 1 -maxdepth 1 -type d`)
|
||||||
echo $dirs
|
|
||||||
for dir in $dirs; do
|
for dir in $dirs; do
|
||||||
if [[ -d $to/$dir ]]; then
|
[[ -d $to/$dir ]] && execute rm -rf $to/$dir
|
||||||
execute rm -rf $to/$dir
|
|
||||||
fi
|
|
||||||
execute cp -rp $dir $to/$dir
|
execute cp -rp $dir $to/$dir
|
||||||
done
|
done
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
@ -45,11 +34,10 @@ copy_file() {
|
|||||||
from=$1
|
from=$1
|
||||||
to=$2
|
to=$2
|
||||||
filename=$(basename $from)
|
filename=$(basename $from)
|
||||||
if [[ -e $to/$filename ]]; then
|
[[ -e $to/$filename ]] && execute rm $to/$filename
|
||||||
execute rm $to/$filename
|
|
||||||
fi
|
|
||||||
execute cp -p $from $to/$filename
|
execute cp -p $from $to/$filename
|
||||||
}
|
}
|
||||||
|
|
||||||
copy_dir .config $HOME/.config
|
copy_dir .config $HOME/.config
|
||||||
|
copy_dir .local $HOME/.local
|
||||||
# copy_file .zxcv $HOME
|
# copy_file .zxcv $HOME
|
11
pre_run_01
11
pre_run_01
@ -1,5 +1,10 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
if [[ ! -d $HOME/bin ]]; then
|
[[ ! -d $HOME/.config ]] && mkdir $HOME/.config
|
||||||
mkdir $HOME/bin
|
[[ ! -d $HOME/.local ]] && mkdir $HOME/.local
|
||||||
fi
|
[[ ! -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
|
||||||
|
16
run
16
run
@ -5,25 +5,15 @@ dry="0"
|
|||||||
|
|
||||||
execute() {
|
execute() {
|
||||||
log "execute $@"
|
log "execute $@"
|
||||||
if [[ $dry != "1" ]]; then
|
[[ $dry != "1" ]] && "$@"
|
||||||
"$@"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
log() {
|
log() {
|
||||||
if [[ $dry != "1" ]]; then
|
[[ $dry != "1" ]] && echo "$@" || echo "[DRY RUN]: $@"
|
||||||
echo "$@"
|
|
||||||
else
|
|
||||||
echo "[DRY RUN]: $@"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while [[ $# > 0 ]]; do
|
while [[ $# > 0 ]]; do
|
||||||
if [[ $1 == "--dry" ]]; then
|
[[ $1 == "--dry" ]] && dry="1" || single_script_filter="$1"
|
||||||
dry="1"
|
|
||||||
else
|
|
||||||
single_script_filter="$1"
|
|
||||||
fi
|
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/zsh
|
|
||||||
|
|
||||||
brew install git tmux
|
|
36
runs/neovim
36
runs/neovim
@ -1,8 +1,32 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
neovim_dir=$HOME/bin/neovim
|
install_command="sudo apt install"
|
||||||
git clone -b v0.10.3 https://github.com/neovim/neovim.git $neovim_dir
|
[[ -x $(which brew) ]] && install_command="brew install"
|
||||||
brew install cmake gettext lua5.1 liblua5.1-0-dev
|
|
||||||
cd $neovim_dir
|
neovim_dir=$HOME/.local/build/neovim
|
||||||
make CMAKE_BUILD_TYPE=RelWithDebInfo
|
neovim_version="v0.10.3"
|
||||||
sudo make install
|
[ ! -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user