Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

naming convention for shell script and makefile

I have a few makefiles that store shared variables, such as CC=gcc , how should I name them?

The candidates are:

common.mk
Make.common
Makefile.common

.. which is more classic? Is there a standard?

Similarly, I have some shell scripts, which should i choose among the following:

do_this_please.sh
do-this-please.sh
DoThisPlease.sh
doThisPlease.sh

Is there a generally accepted 'case' and suffix for these?

like image 335
James Bond Avatar asked Nov 24 '09 14:11

James Bond


1 Answers

Google's open-source style uses underscores as separators: https://google.github.io/styleguide/shellguide.html#s7.4-source-filenames.

So in your case, it would be do_this_please.sh or do_this_please using this style.

like image 199
flow2k Avatar answered Sep 28 '22 07:09

flow2k