dev: automated commit - 2025-06-08 23:28:55
This commit is contained in:
parent
33106ea4a6
commit
0ab9f62ace
13 changed files with 1255 additions and 715 deletions
69
runs/paru
69
runs/paru
|
@ -1,26 +1,59 @@
|
|||
#!/usr/bin/env bash
|
||||
# NAME: Installs paru
|
||||
# NAME: Install paru AUR helper
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if command -v paru &>/dev/null; then
|
||||
echo "paru ya está instalado."
|
||||
exit 0
|
||||
fi
|
||||
# Source common functions
|
||||
source "$(dirname "$0")/../common.sh" || {
|
||||
echo "[ERROR] Could not source common.sh" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "Instalando dependencias necesarias..."
|
||||
sudo pacman -S --needed --noconfirm base-devel git
|
||||
check_requirements() {
|
||||
local required_commands=(git makepkg)
|
||||
|
||||
tmpdir=$(mktemp -d)
|
||||
echo "Temp dir: $tmpdir"
|
||||
cd "$tmpdir"
|
||||
for cmd in "${required_commands[@]}"; do
|
||||
if ! command_exists "$cmd"; then
|
||||
log_error "Required command not found: $cmd"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
echo "Cloning paru..."
|
||||
git clone https://aur.archlinux.org/paru.git
|
||||
cd paru
|
||||
install_paru() {
|
||||
if command_exists paru; then
|
||||
log_info "paru is already installed"
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "Compiling paru..."
|
||||
makepkg -si --noconfirm
|
||||
log_info "Installing build dependencies"
|
||||
sudo pacman -S --needed --noconfirm base-devel git
|
||||
|
||||
echo "Cleaning up..."
|
||||
cd ..
|
||||
rm -rf "$tmpdir"
|
||||
local tmpdir
|
||||
tmpdir=$(mktemp -d)
|
||||
log_info "Using temporary directory: $tmpdir"
|
||||
|
||||
cd "$tmpdir"
|
||||
|
||||
log_info "Cloning paru repository"
|
||||
git clone https://aur.archlinux.org/paru.git
|
||||
cd paru
|
||||
|
||||
log_info "Building and installing paru"
|
||||
makepkg -si --noconfirm
|
||||
|
||||
log_info "Cleaning up temporary files"
|
||||
cd /
|
||||
rm -rf "$tmpdir"
|
||||
}
|
||||
|
||||
main() {
|
||||
init_script
|
||||
|
||||
check_requirements
|
||||
install_paru
|
||||
|
||||
finish_script 0
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue