Closed aasutossh closed 1 year ago
I am unable to test on macOS so any command suggestions are welcome.
sh << "EOF"
LUSH_NAME=$(basename $(pwd))
GIT_NAME=$(git config user.name)
YEAR=$(date +"%Y")
mv colors/lush_template.lua colors/$LUSH_NAME.lua
mv lua/lush_theme/lush_template.lua lua/lush_theme/$LUSH_NAME.lua
if command -v gsed &> /dev/null; then
gsed -i "s/lush_template/$LUSH_NAME/g" colors/$LUSH_NAME.lua
gsed -i "s/COPYRIGHT_NAME/$GIT_NAME/g" LICENSE
gsed -i "s/COPYRIGHT_YEAR/$YEAR/g" LICENSE
git add .
else
echo "Could not find sed, please manually replace 'lush_template' with '$LUSH_NAME' in colors/$LUSH_NAME.vim, and update the LICENCE file."
fi
EOF
Using gnu-sed
instead of sed
the command is pretty much usable.
gnu-sed
can be installed using brew as
brew install gnu-sed
Updated CREATE.md to link here with a note, but the commands remain the same (have to pick one system to support, (GNU) Linux or BSD and I use Linux so ...)
results in