pspush: updates and fixes

  fix nomenclature (this is bash, not java)
  break into multiple funtions for flexibility
  add some error/redundancy checking
  automatic revision lookup
  definition and variable revision

Change-Id: Id7b4551fe13ba1c07170090dc34a1a02314ab6a6
Signed-off-by: KhasMek <Boushh@gmail.com>
Merge "pspush: updates and fixes" into kitkat
Merge branch 'kitkat' of https://github.com/AOKP/build into kitkat