Skip to content

Instantly share code, notes, and snippets.

@jcfr
Created March 22, 2012 23:18
Show Gist options
  • Save jcfr/2165416 to your computer and use it in GitHub Desktop.
Save jcfr/2165416 to your computer and use it in GitHub Desktop.
The following script allows to automatically change the case of CMake script from upper to lower case.
#!/bin/sh
for file in $(find . -type f -name '*\.cmake' -o -name '*\.txt' -o -name '*\.ctest')
do
echo "Processing file [$file]"
for cmd in $(cmake --help-command-list)
do
sed -i "s/${cmd}(/${cmd}(/gI" $file
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment