buildUpgradePackages: check if already running
This commit is contained in:
parent
2510c68166
commit
b4d7404d6f
1 changed files with 5 additions and 0 deletions
|
@ -1,6 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
PKGDIR="/usr/portage/packages"
|
||||
|
||||
if [[ $(pgrep -f -c $(basename $0)) -gt 1 ]] ; then
|
||||
echo other instance still running
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for atom in $(emerge -uDN --pretend --quiet world | grep ^'\[ebuild' | sed -e 's/.* \b\([a-z0-9\-]\+\/[\_A-Za-z\.0-9\-]\+\)\b.*/\1/g');
|
||||
do
|
||||
if [[ ! -f "$PKGDIR/$atom.tbz2" ]]
|
||||
|
|
Loading…
Add table
Reference in a new issue