Make yaourt does not reinstall when already installed

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.