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:
@@ -40,7 +40,8 @@ function fetch() {
|
||||
echo ${RSYNC} ${SERVERURI}::${1}/files/* / > /tmp/$$.sh
|
||||
echo ${RSYNC} --delete ${SERVERURI}::${1}/requires ${SERVERURI}::${1}/scripts ${SERVERURI}::${1}/parameters ${SERVERURI}::${1}/templates ${STORAGE}/${1} >> /tmp/$$.sh
|
||||
echo 'exit $?' >> /tmp/$$.sh
|
||||
/bin/bash /tmp/$$.sh
|
||||
/bin/bash /tmp/$$.sh 2>/tmp/$$.errors | sed s/"^"/"info: ${1}: "/g
|
||||
cat /tmp/$$.errors | grep -v "some files/attrs were not transferred" | sed s/"^"/"error: ${1}: "/g
|
||||
RETVAL=$?
|
||||
rm -f /tmp/$$.sh
|
||||
exit $RETVAL
|
||||
@@ -71,7 +72,7 @@ function template() {
|
||||
fi
|
||||
DESTROOT=""
|
||||
if [ "$NOOP" != "" ]; then
|
||||
DESTROOT=/var/disco/testfs/noop
|
||||
DESTROOT=/var/disco/testfs/noop/scratchfs
|
||||
fi
|
||||
cd ${STORAGE}/${1}/templates
|
||||
for file in $(find . -type f | sed s/"^\.\/"//g)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user