This repository has been archived on 2020-05-08. You can view files and clone it, but cannot push or open issues or pull requests.
understrap/rename-theme.sh

23 lines
530 B
Bash
Raw Normal View History

2020-05-08 13:05:21 +00:00
#!/bin/sh
if [ -z "$1" ] ; then
_name=${PWD##*/}
if [ -z "$_name" ] ; then
echo "Error - could not determine theme name"
echo "Please rerun and pass theme name as an argument."
exit 1
fi
else
_name="$1"
fi
# search and replace
2020-05-08 13:10:51 +00:00
find . -type f -name "*.php" -print0 | xargs -0 sed -i '' -e 's/understrap/'"$_name"'_/g'
2020-05-08 13:18:10 +00:00
echo
echo "---------------------------------"
echo "Don't forget to edit `style.css`!"
echo "---------------------------------"