update functions

	add duplicate code into function library
	remove unnecessary $() around []

On branch master
Changes to be committed:

	modified:   lib/gitkm.lib
	modified:   lib/linuxkm.lib