#!/bin/sh

for file in "$@"; do

  if [ -e "$file" ]; then
    echo "mkcscript: \`$file' exists"
  else
    cat <<EOF > "$file"
#!/usr/bin/env cscript

#include <stdlib.h>
#include <stdio.h>


int main(int argc, char **argv)
{

    return 0;
}

EOF
    chmod +x "$file"
  fi

done

if [ $# -gt 0 ]; then

  ${EDITOR:-vi} "$@"

fi

