testing more robust run command

This commit is contained in:
pika 2025-05-21 18:49:04 +02:00
parent 58b5f36246
commit 0043824506

View file

@ -154,15 +154,20 @@ source_script() {
fi fi
} }
# just an alias for source_script
source-script() { source-script() {
source_script "$1" source_script "$1"
} }
run() { run() {
if $silent; then if [[ -z $silent ]]; then
silentexec "$@"
else
"$@" "$@"
else
if $silent; then
silentexec "$@"
else
"$@"
fi
fi fi
} }
@ -182,7 +187,8 @@ checkAndInstall() {
fi fi
else else
# ─< else go though the list of items and do the same >─────────────────────────────────── # ─< else go though the list of items and do the same >───────────────────────────────────
echo_pkg deps "${BRIGHT_YELLOW}Installing ${RED}${#@}${BRIGHT_YELLOW} packages.. - ${BRIGHT_BLUE} $* ${NC}" echo_pkg deps "${BRIGHT_YELLOW}Installing ${RED}${#@}${BRIGHT_YELLOW} packages..${NC}"
echo_pkg deps "${BRIGHT_BLUE} $* ${NC}"
for deps in "${@}"; do for deps in "${@}"; do
# echo_pkg deps "Installing $deps" # echo_pkg deps "Installing $deps"
if ! command_exists $deps; then if ! command_exists $deps; then
@ -192,7 +198,7 @@ checkAndInstall() {
echo_pkg deps "$deps is already installed.." echo_pkg deps "$deps is already installed.."
fi fi
else else
echo_pkg deps "skipping $1 - as it's ${RED}already installed.." echo_pkg deps "skipping $deps - as it's ${RED}already installed.."
fi fi
done done
fi fi
@ -573,7 +579,7 @@ if check_env; then
touch "$pikaCheckFile" touch "$pikaCheckFile"
fi fi
else else
echo_note "Skipping repo refresh (PIKA_INIT is already set)" echo_pkg "Skipping repo refresh (PIKA_INIT is already set)"
fi fi
fi fi