How to share Drupal code across multisites that are each in subdirectories?
Drupal come with already a multi site feature, you ca read more about it here. 

After, if for some reasons you don't want install Drupal with multi-site and keep the both separate in your server, you can still use Git or SVN and co.

The idea is simple, you've the same codebase for development and multiple clone or checkout in your server. For example, in your case it will be drupal1 and drupal2.