needing to revamp the run() command..
This commit is contained in:
parent
bc95f25101
commit
66299ddd7c
1 changed files with 11 additions and 11 deletions
22
distros.sh
22
distros.sh
|
@ -177,7 +177,7 @@ checkAndInstall() {
|
|||
# ─< if it's not a list, then just check and install the package.. >──────────────────────
|
||||
if [[ -z $2 ]]; then
|
||||
if ! command_exists "$1"; then
|
||||
if run _install "$1"; then
|
||||
if run-silent _install "$1"; then
|
||||
echo_pkg deps "$1 - ${GREEN}installed"
|
||||
else
|
||||
echo_pkg deps "$1 is already installed.."
|
||||
|
@ -192,7 +192,7 @@ checkAndInstall() {
|
|||
for deps in "${@}"; do
|
||||
# echo_pkg deps "Installing $deps"
|
||||
if ! command_exists $deps; then
|
||||
if run _install "$deps"; then
|
||||
if run-silent _install "$deps"; then
|
||||
echo_pkg deps "$deps - ${GREEN}installed"
|
||||
else
|
||||
echo_pkg deps "$deps is already installed.."
|
||||
|
@ -526,8 +526,8 @@ dist_setup() {
|
|||
update_package_list() {
|
||||
echo_info "Refreshing repository sources.."
|
||||
case "$distro" in
|
||||
ubuntu | debian) run $_sudo apt-get update ;;
|
||||
fedora) run $_sudo dnf update ;;
|
||||
ubuntu | debian) run-silent $_sudo apt-get update ;;
|
||||
fedora) run-silent $_sudo dnf update ;;
|
||||
arch)
|
||||
if command_exists pacman; then
|
||||
if ! checkAUR; then
|
||||
|
@ -536,7 +536,7 @@ update_package_list() {
|
|||
$_sudo mkdir -p "$paruBuildDir"
|
||||
# if ! command_exists paru; then
|
||||
echo "${YELLOW}Installing paru as AUR helper...${NC}"
|
||||
run $_sudo pacman -S --needed --noconfirm base-devel git
|
||||
run-silent $_sudo pacman -S --needed --noconfirm base-devel git
|
||||
cd "$paruBuildDir" && $_sudo git clone https://aur.archlinux.org/paru-bin.git paru
|
||||
$_sudo chown -R "$USER": "$paruBuildDir/paru"
|
||||
cd "$paruBuildDir/paru" && makepkg --noconfirm -si
|
||||
|
@ -548,15 +548,15 @@ update_package_list() {
|
|||
fi
|
||||
|
||||
if command_exists paru; then
|
||||
run paru -Sy
|
||||
run-silent paru -Sy
|
||||
elif command_exists yay; then
|
||||
run yay -Sy
|
||||
run-silent yay -Sy
|
||||
else
|
||||
run $_sudo pacman -Sy
|
||||
run-silent $_sudo pacman -Sy
|
||||
fi
|
||||
;;
|
||||
opensuse) run $_sudo zypper ref ;;
|
||||
alpine) run $_sudo apk update ;;
|
||||
opensuse) run-silent $_sudo zypper ref ;;
|
||||
alpine) run-silent $_sudo apk update ;;
|
||||
*)
|
||||
echo_error "Unsupported distribution: ${BRIGHT_RED}$distro"
|
||||
return 69
|
||||
|
@ -570,7 +570,7 @@ if check_env; then
|
|||
|
||||
# WHY:
|
||||
# ╭─────────────────────────────────────────────────────────────────────────╮
|
||||
# │ check if the script has run at least once, so that the sources dont │
|
||||
# │ check if the script has run-silent at least once, so that the sources dont │
|
||||
# │ have to get updated again.. │
|
||||
# ╰─────────────────────────────────────────────────────────────────────────╯
|
||||
if [[ -z "$PIKA_INIT" ]]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue