Useful CLI tools (bash) for Arch Linux administration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

15 lines
529 B

#!/bin/bash
##############################################
# Install locally build program on Arch Linux
if [ -e ./PKGBUILD ]; then #We check whether PKGBUILD file exists. If yes, then...
PACKAGE_NAME=$(cat ./PKGBUILD | grep "pkgname=" | sed -e 's/pkgname=//g') #get package name from PKGBUILD
PACKAGE=$(echo $PACKAGE_NAME*.pkg.tar.xz) #package name + * + suffix
if [ -e $PACKAGE ]; then # If package has been compiled, then...
sudo pacman -U $PACKAGE # ...install the package.
fi
else
return 1
fi