Refactor a few things

This commit is contained in:
2025-01-12 14:30:08 -06:00
parent 1340729f50
commit 7cda3112e0
6 changed files with 16 additions and 37 deletions

16
run
View File

@ -5,25 +5,15 @@ dry="0"
execute() {
log "execute $@"
if [[ $dry != "1" ]]; then
"$@"
fi
[[ $dry != "1" ]] && "$@"
}
log() {
if [[ $dry != "1" ]]; then
echo "$@"
else
echo "[DRY RUN]: $@"
fi
[[ $dry != "1" ]] && echo "$@" || echo "[DRY RUN]: $@"
}
while [[ $# > 0 ]]; do
if [[ $1 == "--dry" ]]; then
dry="1"
else
single_script_filter="$1"
fi
[[ $1 == "--dry" ]] && dry="1" || single_script_filter="$1"
shift
done