mirror of
https://github.com/rocky-linux/rocky-tools.git
synced 2024-11-24 22:21:24 +00:00
Peter Ajamian
fe473ae20b
We previously removed color because (1) it was outputting the color codes to the log file, which we do not want and (2) nobody could agree on what colors to use. I've reintroduced color now fixing (1) by allowing for separate output to the log file and the console and only sending the color codes to the console and (2) well, I've changed the blue for info messages to cyan, hopefully everyone's happy with that, but I'm open to suggestions on the info color. There are now three more file descriptors for specialized output control, making a total of 5: fd1 - This sends to stdout and to the log file. fd2 - This sends to stderr and the log file. fd3 - This just sends to stdout. fd4 - This just sends to stderr. fd5 - This just sends to the logfile. There are also three additional functions: msg_format - Intended to be used by infomsg and errmsg, this accepts a variable name and one or more string args. If there is just one string after the variable name then it is copied to the variable verbatim. If there is more than one then it is taken to be a format specifier and additional args to be passed to printf (output going to the variable). infomsg - This will accept either a single arg which contains a verbatim string or multiple format / args to be processed by printf. The output of this will be sent to the log file and also color coded and sent to stdout. errmsg - Like infomsg but it uses the error color and sends output to stderr instead of stdout. |
||
---|---|---|
migrate2rocky | ||
mirror | ||
README.md |
Rocky Tools
Various scripts and tools that we find useful, whether we use them or they are made for public consumption.
migrate2rocky -- Conversion Script
Running this script will convert an existing CentOS 8 system to Rocky Linux 8.
mirrorsync -- Mirror Script
Example script for keeping a public or private mirror in sync.