Finish initial setup of tmux-sessionizer

This commit is contained in:
david
2025-04-04 16:55:39 -05:00
parent f777f7632b
commit ac18569866
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
}