Finish initial setup of tmux-sessionizer

This commit is contained in:
2025-01-18 14:14:54 -06:00
parent cb8f07a711
commit 201cd90ee8
10 changed files with 67 additions and 66 deletions

View File

@ -1,6 +1,6 @@
#!/bin/zsh
dry="0"
local dry="0"
execute() {
log "execute $@"
@ -19,10 +19,10 @@ done
log "---------------- dotfiles ----------------"
copy_dir() {
from=$1
to=$2
local from=$1
local to=$2
pushd $from > /dev/null
dirs=(`find . -mindepth 1 -maxdepth 1 -type d`)
local dirs=(`find . -mindepth 1 -maxdepth 1 -type d`)
for dir in $dirs; do
[[ -d $to/$dir ]] && execute rm -rf $to/$dir
execute cp -rp $dir $to/$dir
@ -31,9 +31,9 @@ copy_dir() {
}
copy_file() {
from=$1
to=$2
filename=$(basename $from)
local from=$1
local to=$2
local filename=$(basename $from)
[[ -e $to/$filename ]] && execute rm $to/$filename
execute cp -p $from $to/$filename
}