I have the following bash
script which repeats for each image found. It needs to iterated over all html, css and js files, and replac
For support on both OSX and Linux, I use a simple if check to see if the bash script is running on OSX or Linux, and adjust the command's -i
argument based on that.
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' -e 's|$iconPath|images-theme-dark/$iconfile|g' "{}"
else
sed -i -e 's|$iconPath|images-theme-dark/$iconfile|g' "{}"
fi