cake_wallet/scripts/universal_sed.sh
cyan 505ea26533
CW-798 Fix macos 15 issues (#1775)
* update flutter to 3.24.3

* bump flutter to 3.24.4, fix all android issues (i hope)

* update uni_links path

* update sensitive_clipboard

* update dependencies

* update fast_scanner

* update the ref

* Update how_to_add_new_wallet_type.md [skip ci]

* Update how_to_add_new_wallet_type.md [skip ci]

* Update how_to_add_new_wallet_type.md [skip ci]

* Update how_to_add_new_wallet_type.md [skip ci]

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
2024-11-25 16:08:30 +02:00

23 lines
368 B
Bash

#!/bin/bash
detect_sed() {
if sed --version 2>/dev/null | grep -q "GNU"; then
SED_TYPE="GNU"
else
SED_TYPE="BSD"
fi
}
universal_sed() {
local expression=$1
local file=$2
if [[ "$SED_TYPE" == "GNU" ]]; then
pwd
sed -i "$expression" "$file"
else
sed -i '' "$expression" "$file"
fi
}
detect_sed