updated shell script to create links on the fly