Developer Scripts
Uray M. János
I created these shell scripts as helpers for the development of many of my software projects on this website. These scripts are not necessary for using those projects, but they might be useful for doing something more with the source code, e.g. running the tests, or generating a new Makefile.
These scripts use a common configuration file called files-info
, which contains rules and settings for a certain project. You can find a files-info
in many of my projects on this website. Since files-info
itself is a shell script, these scripts are highly customizable and extensible through it.
The simplest way to use these scripts is to use Bash (e.g. on Linux), and move these scripts to a location where the shell automatically finds them (e.g. to /usr/bin
/, or put their path into the environment variable $PATH
).
Summary of the Developer Scripts:
code
: list all (or some) source code files of the project in the current directory, depending on the rules in files-info
(and on the optional command-line arguments of code
). It can be useful in combination with other shell utilities, e.g. grep something `code`
searches "something" in all source files of the current project. makemake
: generate a Makefile for the current project based on the rules in files-info
, by examining the source files and deciding which file depends on which other files (e.g. by the #include
directives in C/C++). A Makefile is a rule file used by e.g. the GNU Make utility to tell how to (re)compile pieces of a large program efficiently. The language-specific rules are in a separate file, make-rules
, which must be moved to the same location as makemake
. new
: create a new empty source file with project-specific header comments and with some language-dependent basic structure (e.g. an empty class), based on the settings in files-info
and on the command-line arguments of new
. The language-specific rules are in a separate file, new-rules
, which must be moved to the same location as new
. push
: transfer files to a remote destination (e.g. a web server) efficiently using ssh/rsync, based on the configuration in files-info
(and on the optional arguments of push
). Only those files are transferred that were changed since the last push
. utest
: run the given command, and compare its output to the given file. It can be used to run unit tests, e.g. through a Makefile (which can be generated by makemake
). For more information, run each script with the --help
argument. Also, see the files-info
in my other projects.
Download the Developer Scripts [devscripts.zip, 30K]
These scripts are free software, released under the GNU General Public License 3.0 (GPLv3) or any later version.
This license is also included in the above package, as license.txt
.
makemake
and push
, while the others should work in any POSIX-compliant shell (tested in Dash and Bash); grep
, sed
, awk
etc. (tested with the GNU Coreutils); push
: ssh
and rsync
.