Finish initial setup of tmux-sessionizer
This commit is contained in:
14
copy_configs
14
copy_configs
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user