move content of shell script directly into c file