This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -x | |
set -e | |
# e.g. folder to process e.g. "frontend/" | |
migration_folder=$1 | |
find_regex=".*/*.tsx?" # mach all .ts and .tsx files | |
# include trailing path "/" in folder parameter: e.g "frontend/" instead of just "frontend" | |
ignore_path="*/$1node_modules/*" | |
# Back up your files or change sed argument -i to -i.bak to generate backup files | |
find $migration_folder -regextype posix-egrep -regex $find_regex -type f -not -path $ignore_path | xargs sed -i -E '/[(class)(")]/{ | |
s/([mp])l(-[0-5])/\1s\2/g |