mirror of
https://github.com/edu4rdshl/simpleaur.git
synced 2026-07-17 23:24:46 +00:00
Added simplechek script for updates check
This commit is contained in:
parent
073011eddf
commit
deaa76c9ed
3 changed files with 29 additions and 5 deletions
|
|
@ -6,7 +6,7 @@ builddir="$HOME/Build/$ipackage" #Define the package Build DIR
|
|||
|
||||
#Check if the base Build DIR exists, if not create it.
|
||||
if [ ! -d "$basebuilddir" ]; then
|
||||
mkdir "$basebuilddir"
|
||||
mkdir "$basebuilddir"
|
||||
fi
|
||||
|
||||
#Define the function that install the AUR package in the system
|
||||
|
|
@ -16,7 +16,7 @@ function installpackage() {
|
|||
#Check if the git clone was sucesfull and decide what to do.
|
||||
if [ -f "$builddir/PKGBUILD" ]; then
|
||||
#Go to the package download directory and execute makepkg to build.
|
||||
cd "$builddir" && ${EDITOR:-vi} PKGBUILD || exit
|
||||
cd "$builddir" && ${EDITOR:-vim} PKGBUILD || exit
|
||||
makepkg -si && cd - &>/dev/null
|
||||
|
||||
#Ask to the user if want to remove the directory created for git
|
||||
|
|
|
|||
24
simplecheck
Executable file
24
simplecheck
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/bash
|
||||
# Script for check package updates from AUR
|
||||
pacmaninstalled="/usr/bin/pacman"
|
||||
simplesearchlocal="./simplesearch"
|
||||
simplesearchglobal="/usr/bin/simplesearch"
|
||||
|
||||
if [ ! -f "$pacmaninstalled" ]; then
|
||||
printf "\n%s\n" "You are not using ArchLinux (pacman not found in $pacmaninstalled)"
|
||||
exit
|
||||
elif [ ! -f "$simplesearchlocal" ] && [ ! -f "$simplesearchglobal" ]; then
|
||||
printf "\n%s\n" "simplesearch not found, make sure that you have the simplesearch script in the current folder or in /usr/bin/simplesearch"
|
||||
exit
|
||||
else
|
||||
if [ -f "$simplesearchlocal" ]; then
|
||||
printf "\n%s\n%s\n" "The following packages are availables for update, you can update one to one using: simpleaur package_name"
|
||||
for aurpkg in $(pacman -Qmq); do ./simplesearch "$aurpkg" |grep "installed:"; done
|
||||
exit
|
||||
|
||||
elif [ -f "$simplesearchglobal" ]; then
|
||||
printf "\n%s\n%s\n" "The following packages are availables for update, you can update one to one using: simpleaur package_name\n"
|
||||
for aurpkg in $(pacman -Qmq); do simplesearch "$aurpkg" |grep "installed:"; done
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
cowerinstalled="/usr/bin/cower"
|
||||
spackage=( "$@" )
|
||||
if [ ! -f "$cowerinstalled" ]; then
|
||||
printf "\n%s\n" "Please, install cower first running in your terminal: gpg --recv-keys --keyserver hkp://pgp.mit.edu 1EB2638FF56C0C53 && simpleaur cower"
|
||||
printf "\n%s\n" "Please, install cower first running in your terminal: gpg --recv-keys 1EB2638FF56C0C53 && simpleaur cower"
|
||||
else
|
||||
if [ "${#spackage[@]}" -ge 0 ]; then
|
||||
cower -sc "${spackage[@]}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue