I think you can only do it manually.
But: you could do a "find" on the command line, and with same sed/awk magic, you might be able to automatically create the entries for your .classpath file.
Alternatively: you should rather look into a build system such as maven or gradle. Such systems allow you to specify dependencies - and the build system will then create an eclipse project for you.
In other words: building up that "meta" information for your projects manually is a thing of the past. Nowadays you only specify what you want to be used, and you use tools that do the rest for you.