Tools and Packages

This page presents a collection of utility scripts we've written to automate various software development and system administration tasks.

Developer scripts

When porting or modifying software distributed in source form, it's often helpful later to see what changes were made to the original source. You can use orig and ckorig to help you do this.

  • orig: Renames original version of file and creates a writable copy.
  • ckorig: Check modifications made to original versions and generate a unified context diff.

If you ever need to move work-in-progress between non-networked machines, use the following scripts to archive to help automate the process.

  • rmbf : Filter that removes build files from a file list (like .o, .a, etc.)
  • zipsrc : Pack a directory of program sources to a .ZIP file, uses rmbf to skip build files.
  • dos2unix : Removes carriage returns from a list of files using tr(1).
  • dirdiff : Find file-by-file differences between current directory and specified directory.

Here are some other scripts you can use to help with various programming-related tasks:

  • cdata : Convert file contents to a C binary data array. Used to embed data files into your C program, e.g. in an embedded application that doesn't have a filesystem.
  • mkdep : Generate makefile dependency information for C/C++ files. Useful when the C compiler/preprocessor doesn't generate dependency information like gcc -M does.
  • mk : Runs make and converts compiler error messages to GNU gcc format, so that M-x compile under Emacs works properly.
  • cvs-ls : Display a folder listing for a CVS module via a pserver connection.

System Administration scripts

If you ever find you need to copy large files between non-networked machines via floppies, use the following scripts to split the file into several floppies and reassemble them.

  • fdpack : Split file across multiple floppies.
  • fdunpack : Reassembles large file from floppies made with fdpack.

When backing up a Red Hat Linux installation, it's helpful to minimize the number of files backed up. Most files in a Red Hat installation are installed from the packages on CD, so there's no point in backing these up. The only files that need be backed up are package files that have been modified, or any files not belonging to any installed package. You can use the following script to generate this modified file list, which can be piped to tar(1) or other similar tool to perform minimal back-ups.

  • sysmods : Generate a list of modified package files and non-package files.
ċ
cdata
(1k)
Dario Alcocer,
Apr 13, 2010, 5:01 AM
ċ
ckorig
(1k)
Dario Alcocer,
Apr 13, 2010, 4:57 AM
ċ
cvs-ls
(1k)
Dario Alcocer,
Jul 28, 2014, 3:41 PM
ċ
dirdiff
(1k)
Dario Alcocer,
Apr 13, 2010, 4:59 AM
ċ
dos2unix
(0k)
Dario Alcocer,
Apr 13, 2010, 4:59 AM
ċ
fdpack
(0k)
Dario Alcocer,
Apr 13, 2010, 5:01 AM
ċ
fdunpack
(0k)
Dario Alcocer,
Apr 13, 2010, 5:01 AM
ċ
mk
(1k)
Dario Alcocer,
Apr 13, 2010, 5:01 AM
ċ
mkdep
(3k)
Dario Alcocer,
Apr 13, 2010, 5:01 AM
ċ
orig
(1k)
Dario Alcocer,
Apr 13, 2010, 4:54 AM
ċ
rmbf
(0k)
Dario Alcocer,
Apr 13, 2010, 4:58 AM
ċ
sysmods
(1k)
Dario Alcocer,
Apr 13, 2010, 5:01 AM
ċ
zipsrc
(1k)
Dario Alcocer,
Apr 13, 2010, 4:59 AM
Comments