It looks good and simple. However you should exclude the file xversion.h itself from the source files.
I added this in the meantime: if [ $2 != $1 ] then
I see you have made a function to extract only the first file. Instead, you can use: set $FILES then use $1 as the first file.
Good idea! I guess that's the best solution. -- Helmut Karlowski