Make server build script more generic