summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2025-02-22 12:32:45 -0500
committerJacob McDonnell <jacob@jacobmcdonnell.com>2025-02-22 12:32:45 -0500
commit238e133c0aceb97cdd2789920202eecdc67eeba7 (patch)
treeb019c6add2f39f0e18d7322cb088aeee2a48bbad /util
parent8cfa6920d50e3165a781df3381cdafa15972c057 (diff)
Ghostty Config
Diffstat (limited to 'util')
-rwxr-xr-xutil50
1 files changed, 25 insertions, 25 deletions
diff --git a/util b/util
index 58cad15..6408e2e 100755
--- a/util
+++ b/util
@@ -5,40 +5,40 @@ set -o shwordsplit
target="$HOME/personal"
log() {
- if [[ $dry == "1" ]]; then
- echo "[DRY_RUN]: $@"
- else
- echo "$@"
- fi
+ if [[ $dry == "1" ]]; then
+ echo "[DRY_RUN]: $@"
+ else
+ echo "$@"
+ fi
}
execute() {
- log "execute $@"
- if [[ $dry == "1" ]]; then
- return
- fi
- "$@"
+ log "execute $@"
+ if [[ $dry == "1" ]]; then
+ return
+ fi
+ "$@"
}
copy_dir() {
- from=$1
- to=$2
- pushd $from
- dirs="$(find . -maxdepth 1 -mindepth 1 -type d)"
- for dir in $dirs; do
- log "Copying $dir"
- execute rm -rf $to/$dir
- execute cp -r $dir $to/$dir
- done
- popd
+ from=$1
+ to=$2
+ pushd $from
+ dirs="$(find . -maxdepth 1 -mindepth 1 -type d)"
+ for dir in $dirs; do
+ log "Copying $dir"
+ execute rm -rf $to/$dir
+ execute cp -r $dir $to/$dir
+ done
+ popd
}
copy_file() {
- from=$1
- to=$2
- name=$(basename $from)
+ from=$1
+ to=$2
+ name=$(basename $from)
- execute rm $to/$name
- execute cp $from $to/$name
+ execute rm $to/$name
+ execute cp $from $to/$name
}