Moved disco colorization into a function, can be used standalone with "client/bin/disco colorize" on stdin.

Fixed disco-fs-diff to only use rsync, sed, grep, etc to produce the filesystem changelog, python script is gone

Minor fixups to other scripts
This commit is contained in:
2012-08-17 19:24:25 -04:00
parent 7d6d94ae3d
commit 3cfffd192e
5 changed files with 57 additions and 36 deletions

View File

@@ -3,9 +3,9 @@
PARAMROOT=/var/disco/parameters
function check_names_regex() {
echo "$1" | grep -E '^[a-zA-Z0-9_-\./]*$' >/dev/null 2>&1
echo $1 | grep -E '^[a-zA-Z0-9_\-\.\/]*$' >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "error: Invalid characters in pathname '$1'. Valid pathname characters are [a-zA-Z0-9_-\.\/]*." >&2
echo "error: Invalid characters in pathname '$1'. Valid pathname characters are [a-zA-Z0-9_-.\/]*." >&2
exit 1
fi
echo "$1" | grep "^/" >/dev/null 2>&1