script to trigger another jenkins job via the api

supports normal, parameterized and matrix jobs
note: you need to put your credentials in the file /etc/jenkinsapi.cred