Artificial intelligent assistant

Make yaourt does not reinstall when already installed Is there a way to make yaourt does not reinstall when the package (from AUR) already installed $ yaourt -Q jruby local/jruby 1.7.3-1 but somehow $ yaourt --needed --noconfirm -S jruby keep redownload (even if it has been downloaded before) and reinstall jruby

A solution can be made with a simple script:

1. Open file

$ vim yaourt-helper.sh


2. Create script

#!/bin/bash
_update="yaourt -Syua --noconfirm"
if ! which $1 2>/dev/null 1>&2; then
echo 'Package not installed, installing'
$_update $1
exit $?;
fi
echo 'Already installed, checking for upgrade'
$_update


3. Set permissions and execute




`$ chmod +x yaourt-helper.sh && ./yaourt-helper.sh jruby`

Note: using `--noconfirm` is dangerous unless your know exactly what you're doing.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 363ebd388328b400e2347cc6f6d75d9b