Refactor names

This commit is contained in:
2025-01-25 17:11:54 -06:00
parent 9660f2c50b
commit bfae90f83a
11 changed files with 38 additions and 24 deletions

33
install_programs Executable file
View File

@ -0,0 +1,33 @@
#!/bin/zsh
local single_script_filter=""
local dry="0"
execute() {
log "execute $@"
[[ $dry != "1" ]] && "$@"
}
log() {
[[ $dry != "1" ]] && echo "$@" || echo "[DRY RUN]: $@"
}
while [[ $# > 0 ]]; do
[[ $1 == "--dry" ]] && dry="1" || single_script_filter="$1"
shift
done
local script_dir=$(cd $(dirname "${ZSH_SOURCE[0]}") &> /dev/null && pwd)
log "install_programs // script_dir: $script_dir -- args: $single_script_filter"
cd $script_dir
local scripts=(`find ./installs_and_builds -maxdepth 1 -mindepth 1 -type f`)
for script in $scripts; do
if [[ -x $script ]]; then
if echo "$script" | grep -qv "$single_script_filter"; then
log "filter is $single_script_filter // ignoring: $script"
continue
fi
execute ./$script
fi
done