This commit is contained in:
JaKooLit
2024-01-01 19:44:32 +09:00
parent 38e3430c64
commit 662e54aecd
22 changed files with 386 additions and 614 deletions

26
install-scripts/paru.sh Normal file → Executable file
View File

@@ -1,25 +1,27 @@
#!/bin/bash
# 💫 https://github.com/JaKooLit 💫 #
# Paru AUR Helper #
# NOTE: If yay is already installed, paru will not be installed #
############## WARNING DO NOT EDIT BEYOND THIS LINE if you dont know what you are doing! ######################################
# Set some colors for output messages
OK="$(tput setaf 2)[OK]$(tput sgr0)"
ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)"
NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)"
WARN="$(tput setaf 166)[WARN]$(tput sgr0)"
CAT="$(tput setaf 6)[ACTION]$(tput sgr0)"
ORANGE=$(tput setaf 166)
YELLOW=$(tput setaf 3)
RESET=$(tput sgr0)
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
# Determine the directory where the script is located
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Change the working directory to the parent directory of the script
PARENT_DIR="$SCRIPT_DIR/.."
cd "$PARENT_DIR" || exit 1
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
# Set the name of the log file to include the current date and time
LOG="install-$(date +%d-%H%M%S)_paru.log"
LOG="Install-Logs/install-$(date +%d-%H%M%S)_paru.log"
# Check for AUR helper and install if not found
ISAUR=$(command -v yay || command -v paru)
if [ -n "$ISAUR" ]; then
printf "\n%s - AUR helper was located, moving on.\n" "${OK}"
printf "\n%s - AUR helper already installed, moving on..\n" "${OK}"
else
printf "\n%s - AUR helper was NOT located\n" "$WARN"
printf "\n%s - Installing paru from AUR\n" "${NOTE}"