awesome/build-utils/atoms-int.sh

21 lines
293 B
Bash
Raw Permalink Normal View History

#!/bin/sh
echo "/* This file is autogenerated by $0 - do not edit */"
echo
while read atom
do
echo xcb_atom_t $atom\;
done < $1
echo
echo 'static atom_item_t ATOM_LIST[] ='
echo '{'
while read atom
do
echo ' { "'$atom'", sizeof("'$atom'") - 1, &'$atom' },'
done < $1
echo '};'