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
Executable File

#!/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
find . -type f -name "*.php" -print0 | xargs -0 sed -i '' -e 's/understrap/'"$_name"'_/g'
echo
echo "---------------------------------"
echo "Don't forget to edit `style.css`!"
echo "---------------------------------"