summarylogtreecommitdiffstats
path: root/microsoft-edge-dev.sh
blob: 66d5bb2d12e6d75518db621ca6e1e88c50218f39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env sh
# Launches MS Edge with flags specified in $XDG_CONFIG_HOME/microsoft-edge-dev-flags.conf

# Make script fail if `cat` fails for some reason
set -e

# Set default value if variable is unset/null
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-${HOME}/.config}"

# Attempt to read a config file if it exists
if [ -r "${XDG_CONFIG_HOME}/microsoft-edge-dev-flags.conf" ]; then
  EDGE_USER_FLAGS="$(cat "$XDG_CONFIG_HOME/microsoft-edge-dev-flags.conf")"
fi

exec /opt/microsoft/msedge-dev/microsoft-edge-dev $EDGE_USER_FLAGS "$@"