The Prometheus monitoring system and time series database.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

25 lines
384 B

#!/bin/sh
cat <<EOF
package blob
var files = map [string] map [string] []byte {
EOF
CDIR=`pwd`
for dir in $@
do
cd "$dir"
echo "\"`basename $dir`\": {"
find -type f | while read file
do
name=`echo "$file"|sed 's|\.\/||'`
echo "\"$name\": {"
gzip -9 -c "$file" | xxd -p |sed 's/\(..\)/0x\1, /g'
echo "},"
echo
done
echo "},"
cd $CDIR
done
echo '}'