mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-13 20:28:18 +10:00
detect sed version instead of using global variable
This commit is contained in:
@@ -3,12 +3,16 @@ DEFAULT_FALSE="'default': false"
|
||||
TELEMETRY_ENABLE="'telemetry.enableTelemetry':"
|
||||
TELEMETRY_CRASH_REPORTER="'telemetry.enableCrashReporter':"
|
||||
|
||||
is_gnu_sed () {
|
||||
sed --version >/dev/null 2>&1
|
||||
}
|
||||
|
||||
replace () {
|
||||
echo $1
|
||||
if [[ "$OS_NAME" == "osx" ]]; then
|
||||
sed -i '' -E "$1" $2
|
||||
else
|
||||
if is_gnu_sed; then
|
||||
sed -i -E "$1" $2
|
||||
else
|
||||
sed -i '' -E "$1" $2
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user