use directory basename instead of full path
rename variables and use basename both inside and outside git repos