Kpm pack generate bash scripts

parent #327 
Since each KRE home only contains one KRE package, it's safe to do the `First()` operation.